+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright © 2015 Copyright (c) Yale University 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 INTERNAL
--->
-<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>features-parent</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-basic-types-features</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <name>${project.artifactId}</name>
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
- <properties>
- <mdsal.version>1.5.0-SNAPSHOT</mdsal.version>
- <restconf.version>1.5.0-SNAPSHOT</restconf.version>
- <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
- <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
- <dlux.version>0.5.0-SNAPSHOT</dlux.version>
- <configfile.directory>etc/opendaylight/karaf</configfile.directory>
- </properties>
- <dependencyManagement>
- <dependencies>
- <!-- project specific dependencies -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>${mdsal.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>restconf-artifacts</artifactId>
- <version>${restconf.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <classifier>features</classifier>
- <version>${mdsal.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-basic-types</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright © 2015 Copyright (c) Yale University 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
--->
-<features name="odl-alto-resourcepool-${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.controller/features-mdsal/${mdsal.version}/xml/features</repository>
- <feature name='odl-alto-basic-types' version='${project.version}' description='OpenDaylight :: ALTO :: basic-types'>
- <!-- FIXME: Bug 4202: Switch to MD-SAL provided odl-mdsal-models-base -->
- <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
- <bundle>mvn:org.opendaylight.alto.core/alto-basic-types/${project.version}</bundle>
- </feature>
-</features>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright © 2015 Copyright (c) Yale University 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
--->
-<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.mdsal</groupId>
- <artifactId>binding-parent</artifactId>
- <version>0.10.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-basic-types</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
-</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2015 Copyright (c) Yale University 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 INTERNAL
---><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">
-
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<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.8.0-SNAPSHOT</version>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>binding-parent</artifactId>
+ <version>0.10.0-SNAPSHOT</version>
<relativePath/>
</parent>
+ <modelVersion>4.0.0</modelVersion>
<groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-basic-types-aggregator</artifactId>
+ <artifactId>alto-basic-types</artifactId>
<version>0.4.0-SNAPSHOT</version>
- <name>alto-basic-types-aggregator</name>
- <packaging>pom</packaging>
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
- <profiles>
- <profile>
- <id>minimal</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <modules>
- <module>model</module>
- </modules>
- </profile>
-
- <profile>
- <id>alto-dev</id>
- <modules>
- <module>model</module>
- <module>features</module>
- </modules>
- </profile>
-
- <profile>
- <id>alto-test</id>
- <modules>
- <module>model</module>
- <module>features</module>
- </modules>
- </profile>
- </profiles>
+ <packaging>bundle</packaging>
- <!-- 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>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright © 2015 Copyright (c) Yale University 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
--->
-
-<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.alto</groupId>
- <artifactId>alto-parent</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <relativePath>../../../</relativePath>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-resourcepool-artifacts</artifactId>
- <packaging>pom</packaging>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-features</artifactId>
- <version>${project.version}</version>
- <classifier>features</classifier>
- <type>xml</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright © 2015 Copyright (c) Yale University 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 INTERNAL
--->
-<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>features-parent</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-resourcepool-features</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <name>${project.artifactId}</name>
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
- <properties>
- <mdsal.version>1.5.0-SNAPSHOT</mdsal.version>
- <restconf.version>1.5.0-SNAPSHOT</restconf.version>
- <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
- <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
- <dlux.version>0.5.0-SNAPSHOT</dlux.version>
- <configfile.directory>etc/opendaylight/karaf</configfile.directory>
- </properties>
- <dependencyManagement>
- <dependencies>
- <!-- project specific dependencies -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>mdsal-artifacts</artifactId>
- <version>${mdsal.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>restconf-artifacts</artifactId>
- <version>${restconf.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>features-yangtools</artifactId>
- <classifier>features</classifier>
- <version>${yangtools.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <classifier>features</classifier>
- <version>${mdsal.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>features-restconf</artifactId>
- <classifier>features</classifier>
- <version>${restconf.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.dlux</groupId>
- <artifactId>features-dlux</artifactId>
- <classifier>features</classifier>
- <version>${dlux.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-basic-types</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-basic-types-features</artifactId>
- <classifier>features</classifier>
- <version>${project.version}</version>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright © 2015 Copyright (c) Yale University 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
--->
-<features name="odl-alto-resourcepool-${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/${yangtools.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.version}/xml/features</repository>
- <repository>mvn:org.opendaylight.alto.core/alto-basic-types-features/${project.version}/xml/features</repository>
- <feature name='odl-alto-resourcepool-api' version='${project.version}' description='OpenDaylight :: ALTO :: resourcepool :: api'>
- <!-- FIXME: Bug 4202: Switch to MD-SAL provided odl-mdsal-models-base -->
- <feature version='${mdsal.version}'>odl-mdsal-all</feature>
- <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
- <feature version='${project.version}'>odl-alto-basic-types</feature>
- <bundle>mvn:org.opendaylight.alto.core/alto-resourcepool-api/${project.version}</bundle>
- </feature>
- <feature name='odl-alto-resourcepool' version='${project.version}' description='OpenDaylight :: ALTO :: resourcepool'>
- <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
- <feature version='${project.version}'>odl-alto-resourcepool-api</feature>
- <bundle>mvn:org.opendaylight.alto.core/alto-resourcepool-impl/${project.version}</bundle>
- <configfile finalname="${configfile.directory}/alto-resourcepool-impl.xml">mvn:org.opendaylight.alto.core/alto-resourcepool-impl/${project.version}/xml/config</configfile>
- </feature>
- <feature name='odl-alto-resourcepool-rest' version='${project.version}' description='OpenDaylight :: ALTO :: resourcepool :: REST'>
- <feature version="${project.version}">odl-alto-resourcepool</feature>
- <feature version="${restconf.version}">odl-restconf</feature>
- </feature>
- <feature name='odl-alto-resourcepool-ui' version='${project.version}' description='OpenDaylight :: ALTO :: resourcepool :: UI'>
- <feature version="${project.version}">odl-alto-resourcepool-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>
<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2015 Copyright (c) Yale University and others. All rights reserved.
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright © 2015 Copyright (c) Yale University 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
--->
-<snapshot>
- <required-capabilities>
- <capability>urn:opendaylight:alto:core:resourcepool:impl?module=alto-resourcepool-impl&revision=2015-09-21</capability>
- <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&revision=2013-10-28</capability>
- </required-capabilities>
- <configuration>
-
- <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
- <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <module>
- <type xmlns:prefix="urn:opendaylight:alto:core:resourcepool:impl">prefix:alto-resourcepool-provider</type>
- <name>alto-resourcepool-default</name>
- <broker>
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
- <name>binding-osgi-broker</name>
- </broker>
- </module>
- </modules>
- </data>
- </configuration>
-</snapshot>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata modelVersion="1.1.0">
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>resources-impl</artifactId>
- <version>1.0.1-SNAPSHOT</version>
- <versioning>
- <snapshot>
- <localCopy>true</localCopy>
- </snapshot>
- <lastUpdated>20150922130129</lastUpdated>
- <snapshotVersions>
- <snapshotVersion>
- <classifier>config</classifier>
- <extension>xml</extension>
- <value>1.0.1-SNAPSHOT</value>
- <updated>20150922130129</updated>
- </snapshotVersion>
- </snapshotVersions>
- </versioning>
-</metadata>
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-
import org.opendaylight.alto.core.resourcepool.ResourcepoolUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class AltoResourcepoolProvider implements BindingAwareProvider, AutoCloseable {
+public class AltoResourcepoolProvider implements AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(AltoResourcepoolProvider.class);
- private DataBroker m_dataBroker = null;
-
- @Override
- public void onSessionInitiated(ProviderContext session) {
- LOG.info("AltoResourcesProvider Session Initiated");
-
- m_dataBroker = session.getSALService(DataBroker.class);
- assert m_dataBroker != null;
+ private DataBroker broker = null;
+ public void init() {
try {
createDefaultContext();
} catch (Exception e) {
protected void createDefaultContext()
throws InterruptedException, ExecutionException, TransactionCommitFailedException {
- WriteTransaction wx = m_dataBroker.newWriteOnlyTransaction();
+ WriteTransaction wx = broker.newWriteOnlyTransaction();
ResourcepoolUtils.createContext(ResourcepoolUtils.DEFAULT_CONTEXT, wx);
}
protected void deleteDefaultContext() throws Exception {
- WriteTransaction wx = m_dataBroker.newWriteOnlyTransaction();
+ WriteTransaction wx = broker.newWriteOnlyTransaction();
ResourcepoolUtils.deleteContext(ResourcepoolUtils.DEFAULT_CONTEXT, wx);
}
LOG.info("AltoResourcesProvider Closed");
}
+
+ public void setBroker(DataBroker broker) {
+ this.broker = broker;
+ }
}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921;
-
-import org.opendaylight.alto.core.resourcepool.impl.AltoResourcepoolProvider;
-
-public class AltoResourcepoolModule extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921.AbstractAltoResourcepoolModule {
- public AltoResourcepoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
- super(identifier, dependencyResolver);
- }
-
- public AltoResourcepoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921.AltoResourcepoolModule oldModule, java.lang.AutoCloseable oldInstance) {
- super(identifier, dependencyResolver, oldModule, oldInstance);
- }
-
- @Override
- public void customValidation() {
- // add custom validation form module attributes here.
- }
-
- @Override
- public java.lang.AutoCloseable createInstance() {
- AltoResourcepoolProvider provider = new AltoResourcepoolProvider();
-
- getBrokerDependency().registerProvider(provider);
- return provider;
- }
-
-}
+++ /dev/null
-/*
-* Generated file
-*
-* Generated from: yang module name: alto-resourcepool-impl yang module local name: alto-resourcepool
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Thu Sep 24 14:28:55 CST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921;
-public class AltoResourcepoolModuleFactory extends org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921.AbstractAltoResourcepoolModuleFactory {
-
-}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ odl:use-default-for-reference-types="true">
+
+ <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"/>
+
+ <bean id="altoResourcepool" class="org.opendaylight.alto.core.resourcepool.impl.AltoResourcepoolProvider"
+ init-method="init" destroy-method="close">
+ <property name="broker" ref="dataBroker"/>
+ </bean>
+
+</blueprint>
+++ /dev/null
-module alto-resourcepool-impl {
- yang-version 1;
-
- namespace "urn:opendaylight:alto:core:resourcepool:impl";
-
- prefix "alto-resourcepool-impl";
-
- import "config" {
- prefix "config";
- revision-date 2013-04-05;
- }
-
- import opendaylight-md-sal-binding {
- prefix "md-sal-binding";
- revision-date 2013-10-28;
- }
-
- description
- "Service definition for resources project";
-
- revision "2015-09-21" {
- description
- "Initial revision";
- }
-
- identity "alto-resourcepool-provider" {
- base config:module-type;
- config:java-name-prefix AltoResourcepool;
- }
-
- augment "/config:modules/config:module/config:configuration" {
- case alto-resourcepool {
- when "/config:modules/config:module/config:type = 'alto-resourcepool-provider'";
-
- container broker {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity md-sal-binding:binding-broker-osgi-registry;
- }
- }
- }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright © 2015 Copyright (c) Yale University 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
- */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921;
-
-import org.junit.Test;
-
-public class AltoResourcepoolModuleFactoryTest {
- @Test
- public void testFactoryConstructor() {
- // ensure no exceptions on construction
- new AltoResourcepoolModuleFactory();
- }
-}
+++ /dev/null
-/*
- * Copyright © 2015 Copyright (c) Yale University 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
- */
-package org.opendaylight.yang.gen.v1.urn.opendaylight.alto.core.resourcepool.impl.rev150921;
-
-import org.junit.Test;
-import org.junit.Assert;
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.JmxAttribute;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.alto.core.resourcepool.impl.AltoResourcepoolProvider;
-
-import javax.management.ObjectName;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class AltoResourcepoolModuleTest {
- @Test
- public void testCustomValidation() {
- AltoResourcepoolModule module = new AltoResourcepoolModule(mock(ModuleIdentifier.class), mock(DependencyResolver.class));
-
- // ensure no exceptions on validation
- // currently this method is empty
- module.customValidation();
- }
-
- @Test
- public void testCreateInstance() throws Exception {
- // configure mocks
- DependencyResolver dependencyResolver = mock(DependencyResolver.class);
- BindingAwareBroker broker = mock(BindingAwareBroker.class);
- when(dependencyResolver.resolveInstance(eq(BindingAwareBroker.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(broker);
-
- // create instance of module with injected mocks
- AltoResourcepoolModule module = new AltoResourcepoolModule(mock(ModuleIdentifier.class), dependencyResolver);
-
- // getInstance calls resolveInstance to get the broker dependency and then calls createInstance
- AutoCloseable closeable = module.getInstance();
-
- // verify that the module registered the returned provider with the broker
- verify(broker).registerProvider((AltoResourcepoolProvider)closeable);
-
- // ensure no exceptions on close
- closeable.close();
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright © 2015 Copyright (c) Yale University 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
--->
-
-<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.controller</groupId>
- <artifactId>mdsal-it-parent</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-resourcepool-it</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
-
- <properties>
- <skipITs>false</skipITs>
- <karaf.distro.groupId>org.opendaylight.alto.core</karaf.distro.groupId>
- <karaf.distro.artifactId>alto-resourcepool-karaf</karaf.distro.artifactId>
- <karaf.distro.version>0.4.0-SNAPSHOT</karaf.distro.version>
- <karaf.distro.type>zip</karaf.distro.type>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-features</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
+++ /dev/null
-/*
- * Copyright © 2015 Copyright (c) Yale University 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
- */
-package org.opendaylight.alto.core.resourcepool.it;
-
-import static org.ops4j.pax.exam.CoreOptions.composite;
-import static org.ops4j.pax.exam.CoreOptions.maven;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.junit.PaxExam;
-import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
-import org.ops4j.pax.exam.options.MavenUrlReference;
-import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
-import org.ops4j.pax.exam.spi.reactors.PerClass;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@RunWith(PaxExam.class)
-@ExamReactorStrategy(PerClass.class)
-public class AltoResourcepoolIT extends AbstractMdsalTestBase {
- private static final Logger LOG = LoggerFactory.getLogger(AltoResourcepoolIT.class);
-
- @Override
- public String getModuleName() {
- return "alto-resourcepool-provider";
- }
-
- @Override
- public String getInstanceName() {
- return "alto-resourcepool-default";
- }
-
- @Override
- public MavenUrlReference getFeatureRepo() {
- return maven()
- .groupId("org.opendaylight.alto.core")
- .artifactId("alto-resourcepool-features")
- .classifier("features")
- .type("xml")
- .versionAsInProject();
- }
-
- @Override
- public String getFeatureName() {
- return "odl-alto-resourcepool-ui";
- }
-
- @Override
- public Option getLoggingOption() {
- Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
- logConfiguration(AltoResourcepoolIT.class),
- LogLevel.INFO.name());
- option = composite(option, super.getLoggingOption());
- return option;
- }
-
- @Test
- public void testresourcepoolFeatureLoad() {
- Assert.assertTrue(true);
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright © 2015 Copyright (c) Yale University 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 INTERNAL
--->
-<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>karaf-parent</artifactId>
- <version>1.8.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-resourcepool-karaf</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <name>${project.artifactId}</name>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
- <properties>
- <karaf.localFeature>odl-alto-resourcepool-ui</karaf.localFeature>
- </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-artifacts</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <!-- scope is compile so all features (there is only one) are installed
- into startup.properties and the feature repo itself is not installed -->
- <groupId>org.apache.karaf.features</groupId>
- <artifactId>framework</artifactId>
- <type>kar</type>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>alto-resourcepool-features</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- <!-- DO NOT install or deploy the karaf artifact -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
<name>alto-resourcepool</name>
<packaging>pom</packaging>
<modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>3.1.1</maven>
- </prerequisites>
<profiles>
<profile>
<module>impl</module>
</modules>
</profile>
-
- <profile>
- <id>alto-dev</id>
- <modules>
- <module>api</module>
- <module>impl</module>
- <module>features</module>
- <module>artifacts</module>
- </modules>
- </profile>
-
- <profile>
- <id>alto-test</id>
- <modules>
- <module>api</module>
- <module>impl</module>
- <module>features</module>
- <module>artifacts</module>
- <module>karaf</module>
- <module>it</module>
- </modules>
- </profile>
</profiles>
<!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.opendaylight.alto.core</groupId>
- <artifactId>alto-resourcepool-impl</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
-
<dependency>
<groupId>org.opendaylight.alto.core</groupId>
<artifactId>alto-northbound-api</artifactId>
description='OpenDaylight :: alto :: Basic'>
<feature version='${project.version}'>odl-alto-simpleird</feature>
<feature version='${project.version}'>odl-alto-manual-maps</feature>
- <feature version='${project.version}'>odl-alto-hosttracker</feature>
+ <feature version='${project.version}'>odl-alto-simpleecs</feature>
<feature version='${project.version}'>odl-alto-auto-maps</feature>
</feature>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version="${openflow.plugin.version}">odl-openflowplugin-flow-services</feature>
<feature version="${openflow.plugin.version}">odl-openflowplugin-southbound</feature>
- <!-- The following top-level l2switch feature pulls in the following odl-l2switch-* features:
- addresstracker, arphandler, hosttracker, loopremover, packethandler -->
- <feature version="${l2switch.version}">odl-l2switch-switch</feature>
- <!-- odl-l2switch-arphandler uses blueprint now, but we still attempt to write data to
- the config subsystem in order to set is-proactive-flood-mode to false. -->
+
+ <feature version="${l2switch.version}">odl-l2switch-loopremover</feature>
+ <feature version="${l2switch.version}">odl-l2switch-hosttracker</feature>
+ <feature version="${l2switch.version}">odl-l2switch-arphandler</feature>
<bundle>mvn:org.opendaylight.alto.spce.network/network-tracker-api/${project.version}</bundle>
<bundle>mvn:org.opendaylight.alto.spce.network/network-tracker-impl/${project.version}</bundle>
</feature>
<feature name='odl-alto-standard-types' version='${project.version}'
- description='OpenDaylight :: alto :: standard-types'>
+ description='OpenDaylight :: alto :: Standard-types'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<bundle>mvn:org.opendaylight.alto.core/alto-basic-types/${project.version}</bundle>
</feature>
<feature name='odl-alto-resourcepool' version='${project.version}'
- description='OpenDaylight :: alto :: resourcepool'>
+ description='OpenDaylight :: alto :: Resourcepool'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature version='${mdsal.version}'>odl-mdsal-all</feature>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<bundle>mvn:org.opendaylight.alto.core/alto-resourcepool-api/${project.version}</bundle>
<bundle>mvn:org.opendaylight.alto.core/alto-resourcepool-impl/${project.version}</bundle>
- <configfile finalname="${configfile.directory}/alto-resourcepool-impl.xml">
- mvn:org.opendaylight.alto.core/alto-resourcepool-impl/${project.version}/xml/config
- </configfile>
</feature>
<feature name='odl-alto-northbound' version='${project.version}'
- description='OpenDaylight :: alto :: northbound'>
+ description='OpenDaylight :: alto :: Northbound'>
<feature version="${restconf.version}">odl-restconf</feature>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
</feature>
<feature name='odl-alto-standard-service-models' version='${project.version}'
- description='OpenDaylight :: alto :: standard-service-model'>
+ description='OpenDaylight :: alto :: Standard-service-model'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature version='${project.version}'>odl-alto-standard-types</feature>
</feature>
<feature name='odl-alto-standard-northbound-route' version='${project.version}'
- description='OpenDaylight :: alto :: standard-northbound-route'>
+ description='OpenDaylight :: alto :: Standard-northbound-route'>
<!-- TODO standard routes for network map/cost map/endpoint cost/endpoint property -->
<feature version='${project.version}'>odl-alto-standard-service-models</feature>
<feature version='${project.version}'>odl-alto-northbound</feature>
</feature>
<feature name='odl-alto-standard-resource-translator' version='${project.version}'
- description='OpenDaylight :: alto :: standard-resource-translator'>
+ description='OpenDaylight :: alto :: Standard-resource-translator'>
<!-- Empty in this release -->
</feature>
<feature name='odl-alto-simpleird' version='${project.version}'
- description='OpenDaylight :: alto :: Simple IRD'>
+ description='OpenDaylight :: alto :: Simple-IRD'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
</feature>
<feature name='odl-alto-manual-maps' version='${project.version}'
- description='OpenDaylight :: alto :: manual-maps'>
+ description='OpenDaylight :: alto :: Manual-maps'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
</configfile>
</feature>
- <feature name='odl-alto-hosttracker' version='${project.version}'
- description='OpenDaylight :: alto :: hosttracker'>
+ <feature name='odl-alto-simpleecs' version='${project.version}'
+ description='OpenDaylight :: alto :: Simple-ECS'>
<feature version='${l2switch.version}'>odl-l2switch-hosttracker</feature>
- <feature version='${l2switch.version}'>odl-l2switch-addresstracker</feature>
<feature version='${project.version}'>odl-alto-core</feature>
<bundle>mvn:org.opendaylight.alto.basic/alto-simple-ecs-api/${project.version}</bundle>
<bundle>mvn:org.opendaylight.alto.basic/alto-simple-ecs-impl/${project.version}</bundle>
- <configfile finalname="${configfile.directory}/alto-hosttracker.xml">
+ <configfile finalname="${configfile.directory}/alto-simpleecs.xml">
mvn:org.opendaylight.alto.basic/alto-simple-ecs-impl/${project.version}/xml/config
</configfile>
</feature>
<feature name='odl-alto-auto-maps' version='${project.version}'
- description='OpenDaylight :: alto :: auto-maps'>
+ description='OpenDaylight :: alto :: Auto-maps'>
<feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
<feature version='${mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${l2switch.version}'>odl-l2switch-hosttracker</feature>
- <feature version='${l2switch.version}'>odl-l2switch-addresstracker</feature>
<feature version='${project.version}'>odl-alto-northbound</feature>
<feature version='${project.version}'>odl-alto-resourcepool</feature>
</feature>
<feature name='odl-alto-nonstandard-types' version='${project.version}'
- description='OpenDaylight :: alto :: nonstandard-types'>
+ description='OpenDaylight :: alto :: Nonstandard-types'>
<!-- Empty in this release -->
</feature>
<feature name='odl-alto-nonstandard-service-models' version='${project.version}'
- description='OpenDaylight :: alto :: nonstandard-service-models'>
+ description='OpenDaylight :: alto :: Nonstandard-service-models'>
<!-- Empty in this release -->
</feature>
<feature name='odl-alto-nonstandard-northbound-route' version='${project.version}'
- description='OpenDaylight :: alto :: nonstandard-northbound-route'>
+ description='OpenDaylight :: alto :: Nonstandard-northbound-route'>
<!-- Empty in this release -->
</feature>