use of org.platformlayer.service.mysql.ops.MysqlTarget in project platformlayer by platformlayer.
the class MysqlConnection method doRecurseOperation.
@Override
public void doRecurseOperation() throws OpsException {
MysqlServer mysqlServer = platformLayerHelpers.getItem(key, MysqlServer.class);
String username = this.username;
if (username == null) {
username = "root";
password = mysqlServer.rootPassword;
}
Machine machine = instanceHelpers.getMachine(mysqlServer);
String address = machine.getNetworkPoint().getBestAddress(NetworkPoint.forTargetInContext());
MysqlTarget mysql = new MysqlTarget(address, username, password);
BindingScope scope = BindingScope.push(mysql);
try {
OpsContext opsContext = OpsContext.get();
OperationRecursor.doRecurseChildren(opsContext, this);
} finally {
scope.pop();
}
}
Aggregations