0d543416165febbe196c75057afd58b639516fd9
[groupbasedpolicy.git] / neutron-mapper / src / main / java / org / opendaylight / controller / config / yang / config / neutron_mapper / impl / NeutronMapperModule.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.config.yang.config.neutron_mapper.impl;
10
11 import org.opendaylight.groupbasedpolicy.neutron.mapper.NeutronMapper;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
14
15 public class NeutronMapperModule extends org.opendaylight.controller.config.yang.config.neutron_mapper.impl.AbstractNeutronMapperModule {
16
17     private final Logger LOG = LoggerFactory.getLogger(NeutronMapperModule.class);
18
19     public NeutronMapperModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
20         super(identifier, dependencyResolver);
21     }
22
23     public NeutronMapperModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.neutron_mapper.impl.NeutronMapperModule oldModule, java.lang.AutoCloseable oldInstance) {
24         super(identifier, dependencyResolver, oldModule, oldInstance);
25     }
26
27     @Override
28     public void customValidation() {
29         // add custom validation form module attributes here.
30     }
31
32     @Override
33     public java.lang.AutoCloseable createInstance() {
34         final NeutronMapper neutronMapper = new NeutronMapper(getDataBrokerDependency(), getRpcRegistryDependency());
35         LOG.info("Neutron mapper started.");
36         return neutronMapper;
37     }
38
39     public static boolean isDebugEnabled() {
40         return true; // TODO add to config-subsystem
41     }
42
43 }