X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=renderers%2Fvpp%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fgroupbasedpolicy%2Frenderer%2Fvpp%2Flisp%2FLispStateCommandExecutor.java;h=95bb1e60f565432aa08036668694452b83857798;hb=c8d5d6270466ec2a03dd2c1154b1dce174eacebe;hp=35f31f9771dd8a9155c743e728a3fbef0008ae1d;hpb=d64f81fb3c87d5a2ebf7e2eba1c3346076a54ce0;p=groupbasedpolicy.git diff --git a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/lisp/LispStateCommandExecutor.java b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/lisp/LispStateCommandExecutor.java index 35f31f977..95bb1e60f 100644 --- a/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/lisp/LispStateCommandExecutor.java +++ b/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/lisp/LispStateCommandExecutor.java @@ -12,16 +12,12 @@ import org.opendaylight.groupbasedpolicy.renderer.vpp.commands.lisp.AbstractLisp import org.opendaylight.groupbasedpolicy.renderer.vpp.util.GbpNetconfTransaction; import org.opendaylight.groupbasedpolicy.renderer.vpp.util.General; import org.opendaylight.groupbasedpolicy.renderer.vpp.util.LispUtil; -import org.opendaylight.groupbasedpolicy.renderer.vpp.util.VppIidFactory; -import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.base.Function; - public class LispStateCommandExecutor { private static final Logger LOG = LoggerFactory.getLogger(LispStateCommandExecutor.class); @@ -31,16 +27,14 @@ public class LispStateCommandExecutor { return executeCommand(nodeIid, lispStateCommand); } - public static boolean executePutCommand(String hostName, - AbstractLispCommand lispStateCommand) { + static boolean executePutCommand(String hostName, AbstractLispCommand lispStateCommand) { lispStateCommand.setOperation(General.Operations.PUT); - return executeCommand(LispUtil.HOSTNAME_TO_IID.apply(hostName), lispStateCommand); + return executeCommand(LispUtil.hostnameToIid(hostName), lispStateCommand); } - public static boolean executeMergeCommand(String hostName, - AbstractLispCommand lispStateCommand) { + static boolean executeMergeCommand(String hostName, AbstractLispCommand lispStateCommand) { lispStateCommand.setOperation(General.Operations.MERGE); - return executeCommand(LispUtil.HOSTNAME_TO_IID.apply(hostName), lispStateCommand); + return executeCommand(LispUtil.hostnameToIid(hostName), lispStateCommand); } public static boolean executeDeleteCommand(InstanceIdentifier nodeIid, @@ -49,14 +43,13 @@ public class LispStateCommandExecutor { return executeCommand(nodeIid, lispStateCommand); } - public static boolean executeDeleteCommand(String hostName, - AbstractLispCommand lispStateCommand) { + static boolean executeDeleteCommand(String hostName, AbstractLispCommand lispStateCommand) { lispStateCommand.setOperation(General.Operations.DELETE); - return executeCommand(LispUtil.HOSTNAME_TO_IID.apply(hostName), lispStateCommand); + return executeCommand(LispUtil.hostnameToIid(hostName), lispStateCommand); } - public static boolean executeCommand(InstanceIdentifier nodeIid, - AbstractLispCommand lispStateCommand) { + private static boolean executeCommand(InstanceIdentifier nodeIid, + AbstractLispCommand lispStateCommand) { final boolean transactionState; switch (lispStateCommand.getOperation()) { case MERGE: