register Host

@Modifying(clearAutomatically = true )
@Query(value = "INSERT INTO " + HOSTS_KEY + " (" + IDENTIFIER_KEY + "," + NAME_KEY + "," + HOST_ADDRESS_KEY + "," + SSH_USER_KEY + "," + SSH_PASSWORD_KEY + "," + STATUS_KEY + "," + SESSION_IDENTIFIER_KEY + "," + INSERTION_DATE_KEY + "," + BROADCAST_IP_KEY + "," + MAC_ADDRESS_KEY + ") VALUES (" + ":" + IDENTIFIER_KEY + "," + ":" + NAME_KEY + "," + ":" + HOST_ADDRESS_KEY + "," + ":" + SSH_USER_KEY + "," + ":" + SSH_PASSWORD_KEY + "," + ":" + STATUS_KEY + "," + ":" + SESSION_IDENTIFIER_KEY + "," + ":" + INSERTION_DATE_KEY + "," + ":" + BROADCAST_IP_KEY + "," + ":" + MAC_ADDRESS_KEY + ")", nativeQuery = true )
abstract fun registerHost(@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 = "status") status: String, @Param(value = "session_id") sessionId: String, @Param(value = "insertion_date") insertionDate: Long, @Param(value = "broadcast_ip") broadcastIp: String, @Param(value = "mac_address") macAddress: String)

Query used to register a new 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

status

The status of the host

sessionId

The identifier of the session owner of the host

insertionDate

The date when the host has been inserted

broadcastIp

The ip address of the remote host network interface

macAddress

The physical mac address of the remote host network interface