Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, note NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, note not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK.

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK.AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object.

I'm no expert, but that's what I gathered.

Examples:

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static NodeRef nodeRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object.

I'm no expert, but that's what I gathered.

Examples:Examples: import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node; import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static NodeRef nodeRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object.object. (afaik, a Ref object is basically the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static NodeRef nodeRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, a Ref object is basically the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static NodeRef nodeRef(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                                                    NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeRef(nodeIId(nodeId));
NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, a Ref object is basically the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                  NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.revAAMMDD...
org.opendaylight.yang.gen.v1.urn.[...].revAAMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, a Ref object is basically the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revAAMMDD.[...]
org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, a Ref object is basically the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty in terms of interface, empty, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, a Ref object is basically the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them AFAIK. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, a Ref object is basically the same as an a URI container, and can be used nearly interchangeably with InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them AFAIK. them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (afaik, (AFAIK, a Ref object is basically the same as a URI container, and can be used nearly interchangeably with is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Node>     NODE_IID     = 
                           InstanceIdentifier.builder(Nodes.class).child(Node.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();
public static final InstanceIdentifier<Link>     LINK_IID     = 
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .child(Link.class)
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). It returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object. I tested this, https://pastebin.com/zCf7nQ19 here. The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples:

import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey; 

public static final InstanceIdentifier<Nodes>    NODES_IID    =
                           InstanceIdentifier.builder(Nodes.class).build();
public static final InstanceIdentifier<Topology> TOPOLOGY_IID =
                           InstanceIdentifier.builder(NetworkTopology.class)
                           .child(Topology.class, new TopologyKey(new TopologyId("flow:1")))
                           .build();

public static InstanceIdentifier<Node> nodeIId(NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId));
}

public static InstanceIdentifier<Node> nodeIId(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) {
    return NODES_IID.child(Node.class, new NodeKey(new NodeId(nodeId.getValue())));
}

public static NodeRef nodeRef(NodeId nodeId) {
    return new NodeRef(nodeIId(nodeId));
}

public static InstanceIdentifier<NodeConnector> nodeConnectorIId(NodeId nodeId,
                                                                 NodeConnectorId ncId) {
    return NODES_IID.child(Node.class, new NodeKey(nodeId))
                              .child(NodeConnector.class, new NodeConnectorKey(ncId));
}

public static NodeConnectorRef nodeConnectorRef(NodeId nodeId, NodeConnectorId ncId) {
    return new NodeConnectorRef(nodeConnectorIId(nodeId, ncId));
}

public static Optional<Node> node(NodeId nodeId, DataBroker dataBroker) {
    try {
        return dataBroker.newReadOnlyTransaction()
                  .read(LogicalDatastoreType.OPERATIONAL, 
                           nodeIId(nodeId)).get();
    } catch (InterruptedException | ExecutionException e) {
        return Optional.absent();
    }
}
Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). It returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this, this: https://pastebin.com/zCf7nQ19 here.

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID).

IID). Note that we also pass "key" objects to the "child": these keys are the unique identifiers for indifivual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects. It returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child": these keys are the unique identifiers for indifivual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects. It objects.

getValue() returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child": these keys are the unique identifiers for indifivual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects.

getValue() returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child": these keys are the unique identifiers for indifivual individual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects.

getValue() returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child": "child" method: these keys are the unique identifiers for individual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects.objects. I assume that their inner field(s) are/(is) final, and therefore impossible to modify after the object is created.

getValue() returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child" method: these keys are the unique identifiers for individual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects. I assume that their inner field(s) are/(is) final, and therefore impossible to modify after the object is created.Mofidying them doesn't seem to be of any use, since one could just as easily make another NodeConnectorRef.

getValue() returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child" method: these keys are the unique identifiers for individual instances of object (hence the + "1" I added to mimic those keys).

For any classes whose imports look like

org.opendaylight.yang.gen.v1.urn.[...].revYYMMDD.[...]

You're looking at yang auto-generated code. Search yang files and you should fine them, but do note that classes like "...Ref", "...Key" and "...Id" are generally all generated together, so what you want to look for is NodeConnector, not NodeConnectorRef. Also, note that classes named in Yang are formatted something-like-this, and not SomethingLikeThis.

So, to answer you more explicitly, I googled node.yang, 4th result on google. All the classes you want are defined here.

All yang-generated classes are often quite empty, so you won't learn much from them. Essentially, a yang-generated class will have an unique ID object, which is its key (the key is made of an ID, and that's pretty much it). The "Ref" is the URI version of the Key or Id of the object, and is used to make a query in MD-SAL. An ID can be made into a key, and Ids and keys can be used to make a Ref, and a Ref can be used to query MD-SAL (dataBroker.new_transaction.read) and obtaining an actual object. (AFAIK, a Ref object is basically the same as a URI container, and is therefore much the same as an InstanceIdentifier object).

I'm no expert, but that's what I gathered.

Examples: https://pastebin.com/uMsjEHAb

EDIT: Node Ref Clarifications

Ref objects have only one public method: getValue(). As far as I know, they are plain data objects, or wrapper objects. Mofidying Modifying them doesn't seem to be of any use, since one could just as easily make another NodeConnectorRef.

getValue() returns an InstanceIdentifier of their object, which itself contains information to reproduce a URI which can then be used for a RESTFUL request to fetch the dedicated object.

I tested this: https://pastebin.com/zCf7nQ19

The second test shows that there's some way to make a URI-like string from the classes of the objects (which is what we pass the "child" methods to build the IID). Note that we also pass "key" objects to the "child" method: these keys are the unique identifiers for individual instances of object (hence the + "1" I added to mimic those keys).