Merge "included the nodetype in the congruence check. also handled the condition...
[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
9 package org.opendaylight.controller.config.yang.test.impl;
10
11 /**
12 *
13 */
14 public final class IdentityTestModule extends org.opendaylight.controller.config.yang.test.impl.AbstractIdentityTestModule
15  {
16
17     public IdentityTestModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
18         super(identifier, dependencyResolver);
19     }
20
21     public IdentityTestModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
22             IdentityTestModule oldModule, java.lang.AutoCloseable oldInstance) {
23
24         super(identifier, dependencyResolver, oldModule, oldInstance);
25     }
26
27     @Override
28     protected void customValidation(){
29         // Add custom validation for module attributes here.
30     }
31
32     @Override
33     public java.lang.AutoCloseable createInstance() {
34         org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(getClass());
35         logger.info("Afi: {}", getAfi());
36         logger.info("Afi class: {}", getAfiIdentity());
37
38         for (Identities identities : getIdentities()) {
39             logger.info("Identities Afi class: {}", identities.resolveAfi());
40             logger.info("Identities Safi class: {}", identities.resolveSafi());
41
42         }
43         logger.info("IdentityContainer Afi class: {}", getIdentitiesContainer().resolveAfi());
44
45         return new AutoCloseable() {
46             @Override
47             public void close() throws Exception {
48             }
49         };
50
51     }
52 }