Search in sources :

Example 1 with TunneledDatabaseTarget

use of org.platformlayer.ops.databases.TunneledDatabaseTarget in project platformlayer by platformlayer.

the class PostgresqlServerController method buildDatabaseTarget.

@Override
public DatabaseTarget buildDatabaseTarget(String username, Secret password, String databaseName) throws OpsException {
    OpsTarget target = instanceHelpers.getTarget(model);
    // Machine machine = instanceHelpers.getMachine(pgServer);
    //
    // String address = machine.getBestAddress(NetworkPoint.forTargetInContext(), POSTGRES_PORT);
    // PostgresTarget mysql = new TunneledPostgresTarget(address, username, password);
    DatabaseTarget db = new TunneledDatabaseTarget(target, username, password, databaseName);
    return db;
}
Also used : OpsTarget(org.platformlayer.ops.OpsTarget) TunneledDatabaseTarget(org.platformlayer.ops.databases.TunneledDatabaseTarget) DatabaseTarget(org.platformlayer.ops.databases.DatabaseTarget) TunneledDatabaseTarget(org.platformlayer.ops.databases.TunneledDatabaseTarget)

Aggregations

OpsTarget (org.platformlayer.ops.OpsTarget)1 DatabaseTarget (org.platformlayer.ops.databases.DatabaseTarget)1 TunneledDatabaseTarget (org.platformlayer.ops.databases.TunneledDatabaseTarget)1