Skip to content

Commit 2d52813

Browse files
committed
fixed build /start management server
1 parent 4c6833b commit 2d52813

5 files changed

Lines changed: 42 additions & 8 deletions

File tree

‎core/src/com/cloud/storage/SwiftVO.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,19 @@ public SwiftVO(String hostName, String account, String userName, String token) {
6262
this.userName = userName;
6363
this.token = token;
6464
}
65-
65+
@Override
6666
public String getHostName() {
6767
return hostName;
6868
}
69-
69+
@Override
7070
public String getAccount() {
7171
return account;
7272
}
73-
73+
@Override
7474
public String getUserName() {
7575
return userName;
7676
}
77-
77+
@Override
7878
public String getToken() {
7979
return token;
8080
}

‎server/src/com/cloud/configuration/DefaultComponentLibrary.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
import com.cloud.storage.snapshot.SnapshotManagerImpl;
128128
import com.cloud.storage.snapshot.SnapshotSchedulerImpl;
129129
import com.cloud.storage.upload.UploadMonitorImpl;
130+
import com.cloud.storage.dao.SwiftDaoImpl;
130131
import com.cloud.template.HyervisorTemplateAdapter;
131132
import com.cloud.template.TemplateAdapter;
132133
import com.cloud.template.TemplateManagerImpl;
@@ -270,7 +271,8 @@ protected void populateDaos() {
270271
addDao("HostTagsDao", HostTagsDaoImpl.class);
271272
addDao("NetworkDomainDao", NetworkDomainDaoImpl.class);
272273
addDao("KeystoreDao", KeystoreDaoImpl.class);
273-
addDao("DcDetailsDao", DcDetailsDaoImpl.class);
274+
addDao("DcDetailsDao", DcDetailsDaoImpl.class);
275+
addDao("SwiftDao", SwiftDaoImpl.class);
274276
}
275277

276278
@Override

‎server/src/com/cloud/storage/dao/SwiftDao.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919
package com.cloud.storage.dao;
2020

21+
import java.util.List;
22+
2123
import com.cloud.storage.SwiftVO;
2224
import com.cloud.utils.db.GenericDao;
2325

24-
public interface SwiftDao extends GenericDao<SwiftVO, Long> {
26+
public interface SwiftDao extends GenericDao<SwiftVO, Long> {
2527
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
3+
*
4+
* This software is licensed under the GNU General Public License v3 or later.
5+
*
6+
* It is free software: you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or any later version.
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
*
17+
*/
18+
19+
package com.cloud.storage.dao;
20+
import javax.ejb.Local;
21+
import com.cloud.storage.SwiftVO;
22+
import org.apache.log4j.Logger;
23+
import com.cloud.utils.db.GenericDaoBase;
24+
25+
@Local (value={SwiftDao.class})
26+
public class SwiftDaoImpl extends GenericDaoBase<SwiftVO, Long> implements SwiftDao {
27+
public static final Logger s_logger = Logger.getLogger(SwiftDaoImpl.class.getName());
28+
}
29+

‎setup/db/create-schema.sql‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ CREATE TABLE `cloud`.`snapshots` (
406406
`created` datetime COMMENT 'Date Created',
407407
`removed` datetime COMMENT 'Date removed. not null if removed',
408408
`backup_snap_id` varchar(255) COMMENT 'Back up uuid of the snapshot',
409-
`swift_id` unsigned COMMENT 'which swift',
409+
`swift_id` bigint unsigned COMMENT 'which swift',
410410
`swift_name` varchar(255) COMMENT 'Back up name in swift',
411411
`prev_snap_id` bigint unsigned COMMENT 'Id of the most recent snapshot',
412412
`hypervisor_type` varchar(32) NOT NULL COMMENT 'hypervisor that the snapshot was taken under',
@@ -1489,11 +1489,12 @@ CREATE TABLE `cloud`.`keystore` (
14891489
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14901490

14911491
CREATE TABLE `cloud`.`swift` (
1492-
`id` bigint unsigned NOT NULL UNIQUE AUTO_INCREMENT,
1492+
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
14931493
`hostname` varchar(255),
14941494
`account` varchar(255) COMMENT ' account in swift',
14951495
`username` varchar(255) COMMENT ' username in swift',
14961496
`token` varchar(255) COMMENT 'token for this user',
1497+
PRIMARY KEY (`id`)
14971498
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14981499

14991500

0 commit comments

Comments
 (0)