edit Host

@Modifying(clearAutomatically = true )
@Query(value = ""UPDATE " + HOSTS_KEY + " SET " + HOST_ADDRESS_KEY + "=:" + HOST_ADDRESS_KEY + "," + NAME_KEY + "=:" + NAME_KEY + "," + SSH_USER_KEY + "= NULL," + SSH_PASSWORD_KEY + "= NULL," + BROADCAST_IP_KEY + "= NULL," + MAC_ADDRESS_KEY + "= NULL" + _WHERE_ + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true )
abstract fun editHost(@Param(value = "id") hostId: String, @Param(value = "name") name: String, @Param(value = "host_address") hostAddress: String)

Query used to edit an existing host

Parameters

hostId

The identifier of the host

name

The name of the host

hostAddress

The address of the host


@Modifying(clearAutomatically = true )
@Query(value = ""UPDATE " + HOSTS_KEY + " SET " + HOST_ADDRESS_KEY + "=:" + HOST_ADDRESS_KEY + "," + NAME_KEY + "=:" + NAME_KEY + "," + SSH_USER_KEY + "=:" + SSH_USER_KEY + "," + SSH_PASSWORD_KEY + "=:" + SSH_PASSWORD_KEY + "," + BROADCAST_IP_KEY + "=:" + BROADCAST_IP_KEY + "," + MAC_ADDRESS_KEY + "=:" + MAC_ADDRESS_KEY + _WHERE_ + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true )
abstract fun editHost(@Param(value = "id") hostId: String, @Param(value = "name") name: String, @Param(value = "host_address") hostAddress: String, @Param(value = "ssh_user") sshUser: String, @Param(value = "ssh_password") sshPassword: String, @Param(value = "broadcast_ip") broadcastIp: String, @Param(value = "mac_address") macAddress: String)

Query used to edit an existing host

Parameters

hostId

The identifier of the host

name

The name of the host

hostAddress

The address of the host

sshUser

The user to use for the SSH connection

sshPassword

The password to use for the SSH connection

broadcastIp

The ip address of the remote host network interface

macAddress

The physical mac address of the remote host network interface