Introduce remaining cli commands for clustering-test-app
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / karaf-cli / src / main / java / org / opendaylight / clustering / it / karaf / cli / InstanceIdentifierSupport.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.clustering.it.karaf.cli;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
12
13 /**
14  * Codec providing translation between CLI representation and {@link InstanceIdentifier}. This is mostly useful for
15  * injecting invocation contexts for {@code routed RPC}s and actions.
16  */
17 public interface InstanceIdentifierSupport {
18     /**
19      * Parse a CLI argument into its {@link InstanceIdentifier} representation.
20      *
21      * @param argument Argument to parse
22      * @return Parse InstanceIdentifier
23      * @throws NullPointerException if {@code argument} is null
24      */
25     @NonNull InstanceIdentifier<?> parseArgument(String argument);
26 }