- .build();
- }
-
- private static String createNodeID(final Integer port) {
- return String.format("%d-sim-device", port);
- }
-
- private static LeafNode<Uint16> leafPort(final int port) {
- return Builders.<Uint16>leafBuilder()
- .withNodeIdentifier(PORT_NODE_IDENTIFIER)
- .withValue(Uint16.valueOf(port))
- .build();
- }
-
- private static LeafNode<String> leafHost(final String host) {
- return Builders.<String>leafBuilder()
- .withNodeIdentifier(HOST_NODE_IDENTIFIER)
- .withValue(host)
- .build();
- }
-
- private static ChoiceNode containerCredentials(final String username, final String password) {
- return Builders.choiceBuilder().withNodeIdentifier(CREDENTIALS_NODE_IDENTIFIER)
- .withChild(Builders.containerBuilder().withNodeIdentifier(LOGIN_PASSWORD_UNENCRYPTED_NODE_IDENTIFIER)
- .withChild(Builders.<String>leafBuilder()
- .withNodeIdentifier(USERNAME_NODE_IDENTIFIER)
- .withValue(username)
- .build())
- .withChild(Builders.<String>leafBuilder()
- .withNodeIdentifier(PASSWORD_NODE_IDENTIFIER)
- .withValue(password)
- .build())
- .build())
- .build();
- }
-
- private static LeafNode<Boolean> leafTcpOnly(final Boolean tcpOnly) {
- return Builders.<Boolean>leafBuilder()
- .withNodeIdentifier(TCP_ONLY_NODE_IDENTIFIER)
- .withValue(tcpOnly)
- .build();
- }
-
- private static LeafNode<Integer> leafKeepaliveDelay(final Integer keepaliveDelay) {
- return Builders.<Integer>leafBuilder()
- .withNodeIdentifier(KEEPALIVE_DELAY_NODE_IDENTIFIER)
- .withValue(keepaliveDelay)
- .build();
- }
+ .build())
+ .withChild(ImmutableNodes.leafNode(TCP_ONLY_NODE_IDENTIFIER, !parameters.ssh))
+ .withChild(ImmutableNodes.leafNode(KEEPALIVE_DELAY_NODE_IDENTIFIER, DEFAULT_NODE_KEEPALIVE_DELAY))
+ .withChild(ImmutableNodes.leafNode(SCHEMALESS_NODE_IDENTIFIER, DEFAULT_NODE_SCHEMALESS))
+ .build());
+ }