Merge "Bug 1029: Remove dead code: samples/clustersession"
[controller.git] / opendaylight / adsal / containermanager / it.implementation / src / main / java / org / opendaylight / controller / containermanager / internal / ContainerImpl.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 /**
11  * @file   ContainerImpl.java
12  *
13  * @brief  Class that instantiated per-container implements the
14  * interface IContainer
15  *
16  *
17  */
18 package org.opendaylight.controller.containermanager.internal;
19
20 import java.util.Dictionary;
21 import org.apache.felix.dm.Component;
22 import org.opendaylight.controller.sal.core.NodeConnector;
23 import java.util.Set;
24 import org.opendaylight.controller.sal.core.Node;
25 import org.opendaylight.controller.sal.core.ContainerFlow;
26 import java.util.List;
27 import org.opendaylight.controller.sal.core.IContainer;
28
29 public class ContainerImpl implements IContainer {
30     private String containerName = null;
31     private String containerAdminRole;
32     private String containerOperatorRole;
33
34     /**
35      * Function called by the dependency manager when all the required
36      * dependencies are satisfied
37      *
38      */
39     void init(Component c) {
40         Dictionary<?, ?> props = c.getServiceProperties();
41         if (props != null) {
42             this.containerName = (String) props.get("containerName");
43         }
44     }
45
46     @Override
47     public String getName() {
48         return this.containerName;
49     }
50
51     @Override
52     public List<ContainerFlow> getContainerFlows() {
53         return null;
54     }
55
56     @Override
57     public short getTag(Node n) {
58         return (short) 0;
59     }
60
61     @Override
62     public Set<NodeConnector> getNodeConnectors() {
63         return null;
64     }
65
66     @Override
67     public Set<Node> getNodes() {
68         return null;
69     }
70
71     @Override
72     public String getContainerAdminRole() {
73         return containerAdminRole;
74     }
75
76     @Override
77     public String getContainerOperatorRole() {
78         return containerOperatorRole;
79     }
80 }