}
LOG.trace("Datastore {} committed successfully: {}", Datastore.candidate, status);
- return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
}
}
LOG.trace("Changes discarded successfully from datastore {}", Datastore.candidate);
- return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
}
}
// Since candidate datastore instances are allocated per session and not accessible anywhere else, no need to lock
LOG.debug("Locking {} datastore on session: {}", targetDatastore, getNetconfSessionIdForReporting());
// TODO should this fail if we are already locked ?
- return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
}
// Not supported running lock
// Since candidate datastore instances are allocated per session and not accessible anywhere else, no need to lock
LOG.debug("Unlocking {} datastore on session: {}", targetDatastore, getNetconfSessionIdForReporting());
// TODO this should fail if we are not locked
- return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
}
// Not supported running lock
LOG.trace("Datastore {} validated successfully", Datastore.candidate);
- return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
}
}
private static final Logger LOG = LoggerFactory.getLogger(EditConfig.class);
- private EditConfigXmlParser editConfigXmlParser;
+ private final EditConfigXmlParser editConfigXmlParser;
public EditConfig(final ConfigSubsystemFacade configSubsystemFacade, final String netconfSessionIdForReporting) {
super(configSubsystemFacade, netconfSessionIdForReporting);
@Override
protected Element handleWithNoSubsequentOperations(Document document, XmlElement xml) throws DocumentedException {
- ConfigExecution configExecution;
// FIXME config mapping getter works on dynamic yang store service and so does later executeConfigExecution method
// They might have different view of current yangs in ODL and might cause race conditions
Config cfg = getConfigSubsystemFacade().getConfigMapping();
- configExecution = editConfigXmlParser.fromXml(xml, cfg);
+ ConfigExecution configExecution = editConfigXmlParser.fromXml(xml, cfg);
return getResponseInternal(document, configExecution);
}
XmlElement sourceNode = sourceElement.getOnlyChildElement();
String sourceParsed = sourceNode.getName();
LOG.debug("Setting source datastore to '{}'", sourceParsed);
- Datastore sourceDatastore = Datastore.valueOf(sourceParsed);
// Filter option: ignore for now, TODO only load modules specified by the filter
- return sourceDatastore;
+ return Datastore.valueOf(sourceParsed);
}
@Override
public HandlingPriority canHandle(Document message) throws DocumentedException {
- XmlElement requestElement = null;
- requestElement = getRequestElementWithCheck(message);
+ XmlElement requestElement = getRequestElementWithCheck(message);
XmlElement operationElement = requestElement.getOnlyChildElement();
final String netconfOperationName = operationElement.getName();
execution.getOn(), execution.getAttributes(), result);
if (execution.isVoid()) {
- return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.<String>absent());
+ return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
} else {
return getConfigSubsystemFacade().getRpcFacade().toXml(document, result, execution);
}
String netconfSessionIdForReporting) {
Set<NetconfOperation> ops = Sets.newHashSet();
- GetConfig getConfigOp = new GetConfig(configSubsystemFacade, Optional.<String> absent(), netconfSessionIdForReporting);
+ GetConfig getConfigOp = new GetConfig(configSubsystemFacade, Optional.absent(), netconfSessionIdForReporting);
ops.add(getConfigOp);
ops.add(new EditConfig(configSubsystemFacade, netconfSessionIdForReporting));
import java.util.Set;
import org.opendaylight.controller.config.facade.xml.ConfigSubsystemFacadeFactory;
import org.opendaylight.controller.config.util.capability.Capability;
-import org.opendaylight.controller.config.util.capability.ModuleListener;
import org.opendaylight.netconf.api.monitoring.CapabilityListener;
import org.opendaylight.netconf.mapping.api.NetconfOperationServiceFactory;
@Override
public AutoCloseable registerCapabilityListener(final CapabilityListener listener) {
- return configFacadeFactory.getYangStoreService().registerModuleListener(new ModuleListener() {
- @Override
- public void onCapabilitiesChanged(Set<Capability> added, Set<Capability> removed) {
- listener.onCapabilitiesChanged(added, removed);
- }
- });
+ return configFacadeFactory.getYangStoreService().registerModuleListener(listener::onCapabilitiesChanged);
}
}
public class NetconfOperationServiceImpl implements NetconfOperationService {
private final NetconfOperationProvider operationProvider;
- private ConfigSubsystemFacade configSubsystemFacade;
+ private final ConfigSubsystemFacade configSubsystemFacade;
public NetconfOperationServiceImpl(final ConfigSubsystemFacade configSubsystemFacade,
final String netconfSessionIdForReporting) {
this.configSubsystemFacade = configSubsystemFacade;
- operationProvider = new NetconfOperationProvider(configSubsystemFacade, netconfSessionIdForReporting);
+ this.operationProvider = new NetconfOperationProvider(configSubsystemFacade, netconfSessionIdForReporting);
}
@Override
<name>${project.artifactId}</name>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-subsystem</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ietf-netconf-monitoring</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <version>${project.version}</version>
</dependency>
</dependencies>
</project>
<packaging>bundle</packaging>
<dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-inet-types-2013-07-15</artifactId>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-yang-types-20130715</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
</dependencies>
</project>
~ 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">
<modelVersion>4.0.0</modelVersion>
<version>0.10.0-SNAPSHOT</version>
<relativePath/>
</parent>
-
+
<groupId>org.opendaylight.netconf</groupId>
<artifactId>ietf-netconf-notifications</artifactId>
<version>1.2.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<packaging>bundle</packaging>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.netconf</groupId>
- <artifactId>netconf-subsystem</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ietf-netconf</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-yang-types-20130715</artifactId>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types-2013-07-15</artifactId>
</dependency>
</dependencies>
</project>
namespace "urn:ietf:params:xml:ns:netmod:notification";
prefix "manageEvent";
- import ietf-yang-types{ prefix yang; revision-date "2013-07-15";}
+ import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
import notifications { prefix ncEvent; revision-date "2008-07-14";}
organization
~ 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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>0.10.0-SNAPSHOT</version>
- <relativePath/>
+ <version>0.10.0-SNAPSHOT</version>
+ <relativePath/>
</parent>
<groupId>org.opendaylight.netconf</groupId>
<name>${project.artifactId}</name>
<dependencies>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>ietf-inet-types-2013-07-15</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
</dependencies>
</project>