Merge "Bug 509: Improve logging in InMemoryDataStore."
[controller.git] / opendaylight / config / yang-test / src / main / java / org / opendaylight / controller / config / yang / test / impl / IdentityTestModule.java
1 /*
2 * Copyright (c) 2013 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 package org.opendaylight.controller.config.yang.test.impl;
9 public class IdentityTestModule extends org.opendaylight.controller.config.yang.test.impl.AbstractIdentityTestModule {
10     public IdentityTestModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
11         super(identifier, dependencyResolver);
12     }
13
14     public IdentityTestModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.test.impl.IdentityTestModule oldModule, java.lang.AutoCloseable oldInstance) {
15         super(identifier, dependencyResolver, oldModule, oldInstance);
16     }
17
18     @Override
19     public void customValidation() {
20         // add custom validation form module attributes here.
21     }
22
23     @Override
24     public java.lang.AutoCloseable createInstance() {
25         org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(getClass());
26         logger.info("Afi: {}", getAfi());
27         logger.info("Afi class: {}", getAfiIdentity());
28
29         for (Identities identities : getIdentities()) {
30             logger.info("Identities Afi class: {}", identities.resolveAfi());
31             logger.info("Identities Safi class: {}", identities.resolveSafi());
32
33         }
34         logger.info("IdentityContainer Afi class: {}", getIdentitiesContainer().resolveAfi());
35
36         return new AutoCloseable() {
37             @Override
38             public void close() throws Exception {
39             }
40         };
41
42     }
43
44 }