diff options
author | Robert Varga <rovarga@cisco.com> | 2016-01-29 23:49:36 +0100 |
---|---|---|
committer | Robert Varga <nite@hq.sk> | 2016-01-30 04:00:58 +0100 |
commit | 4475cf5152d73b8ada4bd567de3e8a99507ad2bb (patch) | |
tree | 6655834894c8cc36bb535a99bf06ef946a40fd16 | |
parent | b3892936301fbf5bb3a0cae83893f12aa0313fc7 (diff) |
Initial Virtual Bridge Domain models
Initial drop of models. Includes a reusable type definition as temporary
model and a network-topology-based model of a virtual bridge domain.
Change-Id: I6e6fbb2063c8157f3f1a329066ccba2b7f66efb1
Signed-off-by: Robert Varga <nite@hq.sk>
-rw-r--r-- | pom.xml | 1 | ||||
-rw-r--r-- | vbd/api/pom.xml | 76 | ||||
-rw-r--r-- | vbd/api/src/main/yang/odl-external-reference.yang | 41 | ||||
-rw-r--r-- | vbd/api/src/main/yang/vbridge-topology.yang | 159 | ||||
-rw-r--r-- | vbd/artifacts/pom.xml | 48 | ||||
-rw-r--r-- | vbd/features/pom.xml | 133 | ||||
-rw-r--r-- | vbd/features/src/main/features/features.xml | 52 | ||||
-rw-r--r-- | vbd/pom.xml | 64 |
8 files changed, 574 insertions, 0 deletions
@@ -27,6 +27,7 @@ <modules> <module>common</module> <module>v3po</module> + <module>vbd</module> </modules> <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build --> <build> diff --git a/vbd/api/pom.xml b/vbd/api/pom.xml new file mode 100644 index 000000000..82cd6fdec --- /dev/null +++ b/vbd/api/pom.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Cisco and/or its affiliates. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>io.fd.honeycomb.common</groupId> + <artifactId>api-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>../../common/api-parent</relativePath> + </parent> + + <groupId>io.fd.honeycomb.vbd</groupId> + <modelVersion>4.0.0</modelVersion> + <artifactId>vbd-api</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>bundle</packaging> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>mdsal-model-artifacts</artifactId> + <version>0.8.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>io.fd.honeycomb.v3po</groupId> + <artifactId>v3po-artifacts</artifactId> + <version>1.0.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>iana-if-type-2014-05-08</artifactId> + </dependency> + <!--dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>ietf-yang-types-20130715</artifactId> + </dependency--> + <!--dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>ietf-interfaces</artifactId> + </dependency--> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>ietf-inet-types-2013-07-15</artifactId> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>ietf-topology</artifactId> + </dependency> + + <dependency> + <groupId>io.fd.honeycomb.v3po</groupId> + <artifactId>v3po-api</artifactId> + </dependency> + </dependencies> +</project> diff --git a/vbd/api/src/main/yang/odl-external-reference.yang b/vbd/api/src/main/yang/odl-external-reference.yang new file mode 100644 index 000000000..e82bfe2b7 --- /dev/null +++ b/vbd/api/src/main/yang/odl-external-reference.yang @@ -0,0 +1,41 @@ +module odl-external-reference { + // vi: set et smarttab sw=4 tabstop=4: + + yang-version 1; + // FIXME: this mode should go to OpenDaylight/mdsal + namespace "urn:opendaylight:params:xml:ns:yang:external:reference"; + prefix "extref"; + + organization "Cisco Systems, Inc."; + + contact "Robert Varga <rovarga@cisco.com>"; + + description + "Model defining the base type for external references for use instead + of an instance-identifier, which does not allow referencing entities + unknown in the model (due to imports, etc.). + + Copyright (c) 2016 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"; + + revision "2016-01-29" { + description "Initial model"; + } + + typedef external-reference { + description "Reference to a YANG-modeled node which resides outside + of this system. The format must use module names as namespace + prefixes -- in a similar fashion RESTCONF does. The reference + is evaluated from the root of the external system. + + This data type does not hold the coordinates of the external + system, nor does it specify which data store on the external + system should be used to satisfy the reference. This information + should be described in the model which instantiates a leaf of + this type."; + type string; + } +} diff --git a/vbd/api/src/main/yang/vbridge-topology.yang b/vbd/api/src/main/yang/vbridge-topology.yang new file mode 100644 index 000000000..36e50aea0 --- /dev/null +++ b/vbd/api/src/main/yang/vbridge-topology.yang @@ -0,0 +1,159 @@ +module vbridge-topology { + // vi: set et smarttab sw=4 tabstop=4: + + yang-version 1; + namespace "urn:opendaylight:params:xml:ns:yang:vbridge:topology"; + prefix "vbridge"; + + organization "Cisco Systems, Inc."; + + contact "Robert Varga <rovarga@cisco.com>"; + + description + "Base model describing a virtual bridge domain mapped expressed + as a network topology. Implementations of this model are expected + to map this topology onto an underlay transport/managent topology, + such as a NETCONF topology talking to forwarding boxes + + Copyright (c) 2015 Cisco and/or its affiliates. + + Licensed under the Apache License, Version 2.0 (the \"License\"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an \"AS IS\" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License."; + + revision "2016-01-29" { + description "Initial cut"; + } + + import ietf-inet-types { prefix "inet"; } + import network-topology { prefix nt; revision-date 2013-10-21; } + import odl-external-reference { prefix extref; } + import v3po { prefix "v3po"; } + + identity tunnel-type { + description "Type of tunneling technology"; + } + + typedef tunnel-type-ref { + description "Reference to a tunneling technology"; + type identityref { + base tunnel-type; + } + } + + identity tunnel-type-vxlan { + // FIXME: should be in a vxlan-specific model + description "VXLAN tunneling"; + base tunnel-type; + } + + augment "/nt:network-topology/nt:topology/nt:topology-types" { + container vbridge-topology { + presence "Indicates a virtual bridge domain topology"; + } + } + + augment "/nt:network-topology/nt:topology" { + when "./nt:topology-types/vbridge-topology"; + + // Pointer to the NETCONF topology which supports this bridge domain + // FIXME: must "../../nt:underlay-topology"; + + leaf tunnel-type { + description "Tunnel technology to use for encapsulation"; + type tunnel-type-ref; + } + + choice tunnel-parameters { + container vxlan { + // FIXME: should be in a vxlan-specific model + when "../type = tunnel-type-vxlan"; + leaf vni { + description "VNI to use for encap"; + type v3po:vxlan-vni; + mandatory true; + } + } + } + + uses v3po:bridge-domain-attributes; + } + + augment "/nt:network-topology/nt:topology/nt:node" { + when "../nt:topology-types/vbridge-topology"; + + container bridge-member { + presence "Indicates this node is part of the bridge domain"; + + // Pointer to the NETCONF node which supports this bridge member + must "../../nt:supporting-node"; + + // FIXME: this is implementation specific, depends on whether + // the underlay has an a concept of a bridge domain. + leaf supporting-bridge-domain { + description + "Reference to the network element bridge domain, which has + been configured to support this virtual bridge domain on + this bridge member. + + This reference needs to be resolved against the supporting + node's configuration data store."; + config false; + type extref:external-reference; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" { + when "../bridge-member"; + + choice interface-type { + leaf user-interface { + description + "Reference to the network element interface, which is + configured to be a member of this virtual bridge domain. + + This reference needs to be resolved against the supporting + node's configuration data store."; + type extref:external-reference; + mandatory true; + } + leaf tunnel-interface { + description + "Reference to the network element interface, which is + configured to on the member to support exchange of packet + passing through this virtual bridge domain towards other + domain members. + + This reference needs to be resolved against the supporting + node's configuration data store."; + config false; + type extref:external-reference; + mandatory true; + } + } + } + + augment "/nt:network-topology/nt:topology/nt:link" { + when "../nt:topology-types/vbridge-topology"; + + leaf tunnel { + description + "Reference to the network element tunnel interface supporting + cross-connect between two bridge members. + + This reference needs to be resolved against the supporting + node's operational data store."; + config false; + type extref:external-reference; + } + } +} diff --git a/vbd/artifacts/pom.xml b/vbd/artifacts/pom.xml new file mode 100644 index 000000000..8042b9e92 --- /dev/null +++ b/vbd/artifacts/pom.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Cisco and/or its affiliates. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <modelVersion>4.0.0</modelVersion> + <groupId>io.fd.honeycomb.vbd</groupId> + <artifactId>vbd-artifacts</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vbd-api</artifactId> + <version>1.0.0-SNAPSHOT</version> + </dependency> + <!-- + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vbd-impl</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vbd-features</artifactId> + <version>1.0.0-SNAPSHOT</version> + <classifier>features</classifier> + <type>xml</type> + </dependency> + --> + </dependencies> + </dependencyManagement> +</project> diff --git a/vbd/features/pom.xml b/vbd/features/pom.xml new file mode 100644 index 000000000..6483138fa --- /dev/null +++ b/vbd/features/pom.xml @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Cisco and/or its affiliates. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>io.fd.honeycomb.common</groupId> + <artifactId>features-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>../../common/features-parent</relativePath> + </parent> + + <groupId>io.fd.honeycomb.vbd</groupId> + <artifactId>vbd-features</artifactId> + <version>1.0.0-SNAPSHOT</version> + <name>${project.artifactId}</name> + <modelVersion>4.0.0</modelVersion> + + <prerequisites> + <maven>3.1.1</maven> + </prerequisites> + <properties> + <mdsal.version>2.0.0-SNAPSHOT</mdsal.version> + <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version> + <restconf.version>1.3.0-SNAPSHOT</restconf.version> + <netconf.mdsal.version>1.3.0-SNAPSHOT</netconf.mdsal.version> + <netconf.version>1.0.0-SNAPSHOT</netconf.version> + <yangtools.version>0.8.0-SNAPSHOT</yangtools.version> + <dlux.version>0.3.0-SNAPSHOT</dlux.version> + <v3po.version>1.0.0-SNAPSHOT</v3po.version> + <configfile.directory>etc/opendaylight/karaf</configfile.directory> + </properties> + <dependencyManagement> + <dependencies> + <!-- project specific dependencies --> + <dependency> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>mdsal-artifacts</artifactId> + <version>2.0.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>mdsal-model-artifacts</artifactId> + <version>0.8.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.yangtools</groupId> + <artifactId>yangtools-artifacts</artifactId> + <version>0.8.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>io.fd.honeycomb.v3po</groupId> + <artifactId>v3po-artifacts</artifactId> + <version>1.0.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>io.fd.honeycomb.vbd</groupId> + <artifactId>vbd-artifacts</artifactId> + <version>1.0.0-SNAPSHOT</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.opendaylight.yangtools</groupId> + <artifactId>features-yangtools</artifactId> + <classifier>features</classifier> + <type>xml</type> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>features-mdsal</artifactId> + <classifier>features</classifier> + <type>xml</type> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal.model</groupId> + <artifactId>features-mdsal-model</artifactId> + <classifier>features</classifier> + <type>xml</type> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>io.fd.honeycomb.v3po</groupId> + <artifactId>v3po-features</artifactId> + <classifier>features</classifier> + <type>xml</type> + <scope>runtime</scope> + </dependency> + + <!--dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vbd-impl</artifactId> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vbd-impl</artifactId> + <type>xml</type> + <classifier>config</classifier> + </dependency--> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>vbd-api</artifactId> + </dependency> + </dependencies> +</project> diff --git a/vbd/features/src/main/features/features.xml b/vbd/features/src/main/features/features.xml new file mode 100644 index 000000000..b35290211 --- /dev/null +++ b/vbd/features/src/main/features/features.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- vi: set et smarttab sw=4 tabstop=4: --> +<!-- + Copyright (c) 2015 Cisco and/or its affiliates. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<features name="odl-vbd-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0"> + <repository>mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features</repository> + <repository>mvn:org.opendaylight.mdsal/features-mdsal/{{VERSION}}/xml/features</repository> + <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features</repository> + <repository>mvn:io.fd.honeycomb.v3po/v3po-features/{{VERSION}}/xml/features</repository> + + <feature name='odl-vbd-api' version='${project.version}' description='OpenDaylight :: vbd :: api'> + <feature version='${mdsal.model.version}'>odl-mdsal-models</feature> + <feature version='${v3po.version}'>odl-v3po-api</feature> + <bundle>mvn:io.fd.honeycomb.vbd/vbd-api/{{VERSION}}</bundle> + </feature> + + <feature name='odl-vbd' version='${project.version}' description='OpenDaylight :: vbd'> + <feature version='${mdsal.version}'>odl-mdsal-binding</feature> + <feature version='${project.version}'>odl-vbd-api</feature> + <feature version='${netconf.version}'>odl-netconf-connector-ssh</feature> + <feature version='${netconf.mdsal.version}'>odl-netconf-mdsal</feature> + <!--bundle>mvn:io.fd.honeycomb.vbd/vbd-impl/{{VERSION}}</bundle--> + <!--configfile finalname="${configfile.directory}/vbd.xml">mvn:io.fd.honeycomb.vbd/vbd-impl/{{VERSION}}/xml/config</configfile--> + </feature> + + <!--feature name='odl-vbd-rest' version='${project.version}' description='OpenDaylight :: vbd :: REST'> + <feature version="${project.version}">odl-vbd</feature> + <feature version="${restconf.version}">odl-restconf</feature> + </feature> + + <feature name='odl-vbd-ui' version='${project.version}' description='OpenDaylight :: vbd :: UI'> + <feature version="${project.version}">odl-vbd-rest</feature> + <feature version="${restconf.version}">odl-mdsal-apidocs</feature> + <feature version="${mdsal.version}">odl-mdsal-xsql</feature> + <feature version="${dlux.version}">odl-dlux-yangui</feature> + </feature--> + +</features> diff --git a/vbd/pom.xml b/vbd/pom.xml new file mode 100644 index 000000000..d593e6081 --- /dev/null +++ b/vbd/pom.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2015 Cisco and/or its affiliates. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + <parent> + <groupId>org.opendaylight.odlparent</groupId> + <artifactId>odlparent</artifactId> + <version>1.6.0-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>io.fd.honeycomb.vbd</groupId> + <artifactId>vbd-aggregator</artifactId> + <version>1.0.0-SNAPSHOT</version> + <name>Virtual Bridge Domain</name> + <packaging>pom</packaging> + <modelVersion>4.0.0</modelVersion> + <prerequisites> + <maven>3.1.1</maven> + </prerequisites> + <modules> + <module>api</module> + <module>artifacts</module> + <module>features</module> + + <!-- FIXME: these need to be enabled: + <module>impl</module> + <module>karaf</module> + <module>it</module> + --> + </modules> + <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build --> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-install-plugin</artifactId> + <configuration> + <skip>true</skip> + </configuration> + </plugin> + </plugins> + </build> +</project> |