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
)
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