}
NodeBuilder builder = new NodeBuilder();
builder.setId(new NodeId(nodeId));
- builder.setKey(new NodeKey(builder.getId()));
+ builder.withKey(new NodeKey(builder.getId()));
return builder;
}
private void createTestNode() {
NodeBuilder builder = new NodeBuilder();
builder.setId(new NodeId(OpenflowpluginTestActivator.NODE_ID));
- builder.setKey(new NodeKey(builder.getId()));
+ builder.withKey(new NodeKey(builder.getId()));
testNode12 = builder.build();
}
// Wrap our Apply Action in an Instruction
InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
- ib.setKey(new InstructionKey(0));
+ ib.withKey(new InstructionKey(0));
ib.setOrder(0);
// Put our Instruction in a list of Instructions
// flow
flow.setOutPort(outputPort);
- flow.setKey(key);
+ flow.withKey(key);
flow.setPriority(2);
flow.setFlowName(originalFlowName + "X" + flowType);
return flow;
private void createUserNode(String nodeRef) {
NodeBuilder builder = new NodeBuilder();
builder.setId(new NodeId(nodeRef));
- builder.setKey(new NodeKey(builder.getId()));
+ builder.withKey(new NodeKey(builder.getId()));
testNode12 = builder.build();
}
}
private InstanceIdentifier<Node> nodeToInstanceId(Node node) {
- return InstanceIdentifier.create(Nodes.class).child(Node.class, node.getKey());
+ return InstanceIdentifier.create(Nodes.class).child(Node.class, node.key());
}
public void _removeGroups(CommandInterpreter ci) {
ReadWriteTransaction modification = dataBroker.newReadWriteTransaction();
InstanceIdentifier<Group> path1 = InstanceIdentifier.create(Nodes.class)
- .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class)
+ .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class)
.child(Group.class, new GroupKey(group.getGroupId()));
modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode12), testNode12, true);
modification.merge(LogicalDatastoreType.CONFIGURATION, path1, group, true);
InstanceIdentifier<Group> path2 = InstanceIdentifier.create(Nodes.class)
- .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class)
+ .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class)
.child(Group.class, new GroupKey(group1.getGroupId()));
modification.merge(LogicalDatastoreType.CONFIGURATION, nodeToInstanceId(testNode12), testNode12, true);
modification.merge(LogicalDatastoreType.CONFIGURATION, path2, group1, true);
private void deleteGroup(final CommandInterpreter ci, Group group, Group group1) {
ReadWriteTransaction modification = dataBroker.newReadWriteTransaction();
InstanceIdentifier<Group> path1 = InstanceIdentifier.create(Nodes.class)
- .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class)
+ .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class)
.child(Group.class, new GroupKey(group.getGroupId()));
modification.delete(LogicalDatastoreType.OPERATIONAL, path1);
modification.delete(LogicalDatastoreType.CONFIGURATION, path1);
InstanceIdentifier<Group> path2 = InstanceIdentifier.create(Nodes.class)
- .child(Node.class, testNode12.getKey()).augmentation(FlowCapableNode.class)
+ .child(Node.class, testNode12.key()).augmentation(FlowCapableNode.class)
.child(Group.class, new GroupKey(group1.getGroupId()));
modification.delete(LogicalDatastoreType.OPERATIONAL, path2);
modification.delete(LogicalDatastoreType.CONFIGURATION, path2);
GroupBuilder group = new GroupBuilder();
BucketBuilder bucket = new BucketBuilder();
bucket.setBucketId(new BucketId((long) 12));
- bucket.setKey(new BucketKey(new BucketId((long) 12)));
+ bucket.withKey(new BucketKey(new BucketId((long) 12)));
if (groupType == null) {
groupType = "g1";
long id = Long.parseLong(strId);
GroupKey key = new GroupKey(new GroupId(id));
- group.setKey(key);
+ group.withKey(key);
// group.setInstall(false);
group.setGroupId(new GroupId(id));
group.setGroupName(originalGroupName);
PopVlanActionBuilder vlanAction = new PopVlanActionBuilder();
ActionBuilder action = new ActionBuilder();
action.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(vlanAction.build()).build());
- action.setKey(new ActionKey(0));
+ action.withKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
groupActionB.setGroup("0");
ActionBuilder action = new ActionBuilder();
action.setAction(new GroupActionCaseBuilder().setGroupAction(groupActionB.build()).build());
- action.setKey(new ActionKey(0));
+ action.withKey(new ActionKey(0));
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;