Add support for identity-ref config attributes to config/netconf subsystem
[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         System.err.println(getAfi());
35         System.err.println(getAfiIdentity());
36
37         getAfiIdentity();
38         for (Identities identities : getIdentities()) {
39             identities.resolveAfi();
40             identities.resolveSafi();
41         }
42         getIdentitiesContainer().resolveAfi();
43
44         return new AutoCloseable() {
45             @Override
46             public void close() throws Exception {
47             }
48         };
49
50     }
51 }