X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fnetworkanalyzer%2Fport%2FNoPreference.java;fp=pce%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fpce%2Fnetworkanalyzer%2Fport%2FNoPreference.java;h=5b96ca09a8e904640195cf5809a6b65ea6acdcfa;hb=0ff30a6562e1d6fd8aa31a7b795ca5ecb398d7b0;hp=0000000000000000000000000000000000000000;hpb=56e494764739075a80f9b00f84145e0093081bb8;p=transportpce.git diff --git a/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/port/NoPreference.java b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/port/NoPreference.java new file mode 100644 index 000000000..5b96ca09a --- /dev/null +++ b/pce/src/main/java/org/opendaylight/transportpce/pce/networkanalyzer/port/NoPreference.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 Smartoptics and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.transportpce.pce.networkanalyzer.port; + +/** + * This class represents a state where the client has no port preference. + * In essence, all ports on all nodes will therefore be treated as 'preferred' + * when queried. + * + *

+ * Usage of this class is of sorts the 'backwards compatible' approach. Meaning, + * intended to offer a path for the application to behave as it did + * prior to implementing client port preference. + */ +public class NoPreference implements Preference { + @Override + public boolean isPreferredPort(String node, String portName) { + return true; + } +}