summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
index 87ea49ee5e..ed64abd982 100644
--- a/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/db/migration/R__CloudConfigMigration.java
@@ -96,8 +96,8 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro
LOGGER.debug("Starting migration for CloudConfig-->IdentityService");
String insert = "INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`) " +
"VALUES (?,?,?,?,?,?,?,?,?,?);";
- PreparedStatement ps = connection.prepareStatement(insert);
- try (Statement stmt = connection.createStatement()) {
+
+ try (Statement stmt = connection.createStatement();PreparedStatement ps = connection.prepareStatement(insert)) {
for (CloudIdentity cloudIdentity : entities) {
try (ResultSet rows = stmt.executeQuery("Select count(1) from identity_services where id='" + cloudIdentity.getId() + "'")) {
int count = 0;
@@ -126,8 +126,8 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro
LOGGER.debug("Starting migration for CloudConfig-->CloudSite");
String insert = "INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`) " +
"VALUES (?,?,?,?,?,?,?,?,?);";
- PreparedStatement ps = connection.prepareStatement(insert);
- try (Statement stmt = connection.createStatement()) {
+
+ try (Statement stmt = connection.createStatement();PreparedStatement ps = connection.prepareStatement(insert)) {
for (CloudSite cloudSite : entities) {
try (ResultSet rows = stmt.executeQuery("Select count(1) from cloud_sites where id='" + cloudSite.getId() + "'")) {
int count = 0;
@@ -154,8 +154,8 @@ public class R__CloudConfigMigration implements JdbcMigration , MigrationInfoPro
private void migrateCloudifyManagers(Collection<CloudifyManager> entities, Connection connection) throws Exception {
String insert = "INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`)" +
" VALUES (?,?,?,?,?,?);";
- PreparedStatement ps = connection.prepareStatement(insert);
- try (Statement stmt = connection.createStatement()) {
+
+ try (Statement stmt = connection.createStatement();PreparedStatement ps = connection.prepareStatement(insert)) {
for (CloudifyManager cloudifyManager : entities) {
try (ResultSet rows = stmt.executeQuery("Select count(1) from cloudify_managers where id='" + cloudifyManager.getId() + "'")) {
int count = 0;