2 * Copyright (c) 2024 PANTHEON.tech s.r.o. and others. All rights reserved.
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
8 package org.opendaylight.netconf.keystore.plaintext.cli;
10 import org.apache.karaf.shell.api.action.Argument;
11 import org.apache.karaf.shell.api.action.Command;
12 import org.apache.karaf.shell.api.action.lifecycle.Service;
15 @Command(scope = AbstractCommand.SCOPE, name = "get", description = "Gets property value by name")
16 public class Get extends AbstractCommand {
18 @Argument(name = "name", required = true)
22 @SuppressWarnings("RegexpSinglelineJava")
23 void executeCommand() {
24 final var result = storage.lookup(toBytes(key));
25 System.out.println(result == null ? notFound(key) : toString(result));