Refresh IETF client/server models
[netconf.git] / transport / transport-ssh / src / main / java / org / opendaylight / netconf / transport / ssh / IetfSshClientProvider.java
1 /*
2  * Copyright (c) 2022 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.netconf.transport.ssh;
9
10 import java.util.Set;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.kohsuke.MetaInfServices;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ssh.client.rev240208.ClientIdentHostbased;
14 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ssh.client.rev240208.ClientIdentPassword;
15 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ssh.client.rev240208.ClientIdentPublickey;
16 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ssh.client.rev240208.IetfSshClientData;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ssh.client.rev240208.SshClientKeepalives;
18 import org.opendaylight.yangtools.yang.binding.YangFeature;
19 import org.opendaylight.yangtools.yang.binding.YangFeatureProvider;
20
21 /**
22  * Client features supported by SSH transport.
23  */
24 @MetaInfServices
25 @NonNullByDefault
26 public final class IetfSshClientProvider implements YangFeatureProvider<IetfSshClientData> {
27     @Override
28     public Class<IetfSshClientData> boundModule() {
29         return IetfSshClientData.class;
30     }
31
32     @Override
33     public Set<? extends YangFeature<?, IetfSshClientData>> supportedFeatures() {
34         // client identification `None` is not supported (not recommended in server yang)
35         return Set.of(
36                 ClientIdentPassword.VALUE,
37                 ClientIdentPublickey.VALUE,
38                 ClientIdentHostbased.VALUE,
39                 SshClientKeepalives.VALUE);
40     }
41 }