basics of adding / removing hetzner servers

This commit is contained in:
Andras Bacsai committed 2025-10-09 10:41:29 +02:00
1 parent c1bcc41546
commit 215301fa8f
15 files changed
+744 -119

No files matched your search

+11
View File
@@ -289,6 +289,17 @@ class PrivateKey extends BaseModel
}
}
public static function generateMd5Fingerprint($privateKey)
{
try {
$key = PublicKeyLoader::load($privateKey);
return $key->getPublicKey()->getFingerprint('md5');
} catch (\Throwable $e) {
return null;
}
}
public static function fingerprintExists($fingerprint, $excludeId = null)
{
$query = self::query()
+1
View File
@@ -162,6 +162,7 @@ class Server extends BaseModel
'description',
'private_key_id',
'team_id',
'hetzner_server_id',
];
protected $guarded = [];