Skip to content

Commit 1797cc4

Browse files
committed
Remove awsapi leftovers
1 parent 4f11707 commit 1797cc4

21 files changed

Lines changed: 50 additions & 2973 deletions

File tree

api/src/main/java/com/cloud/configuration/ConfigurationService.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,6 @@ Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCap
299299
*/
300300
Vlan updateVlanAndPublicIpRange(UpdateVlanIpRangeCmd cmd) throws ConcurrentOperationException,
301301
ResourceUnavailableException, ResourceAllocationException;
302-
/**
303-
* Marks the account with the default zone-id.
304-
*
305-
* @return The new account object
306-
*/
307-
Account markDefaultZone(String accountName, long domainId, long defaultZoneId);
308-
309302
boolean deleteVlanIpRange(DeleteVlanIpRangeCmd cmd);
310303

311304
Vlan dedicatePublicIpRange(DedicatePublicIpRangeCmd cmd) throws ResourceAllocationException;

api/src/main/java/com/cloud/event/EventTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ public class EventTypes {
297297
public static final String EVENT_ACCOUNT_CREATE = "ACCOUNT.CREATE";
298298
public static final String EVENT_ACCOUNT_DELETE = "ACCOUNT.DELETE";
299299
public static final String EVENT_ACCOUNT_UPDATE = "ACCOUNT.UPDATE";
300-
public static final String EVENT_ACCOUNT_MARK_DEFAULT_ZONE = "ACCOUNT.MARK.DEFAULT.ZONE";
300+
public static final String EVENT_ACCOUNT_MARK_DEFAULT_ZONE = "ACCOUNT.MARK.DEFAULT.ZONE"; // Not used anymore, but left for the Account entity mapping
301301

302302
// UserVO Events
303303
public static final String EVENT_USER_LOGIN = "USER.LOGIN";

api/src/main/java/com/cloud/user/Account.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ public static Type getFromValue(Integer type){
8787

8888
public String getNetworkDomain();
8989

90-
public Long getDefaultZoneId();
91-
9290
@Override
9391
public String getUuid();
9492

api/src/main/java/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,6 @@ public class ApiConstants {
908908
public static final String HA_HOST = "hahost";
909909
public static final String CUSTOM_DISK_OFF_MIN_SIZE = "customdiskofferingminsize";
910910
public static final String CUSTOM_DISK_OFF_MAX_SIZE = "customdiskofferingmaxsize";
911-
public static final String DEFAULT_ZONE_ID = "defaultzoneid";
912911
public static final String LIVE_MIGRATE = "livemigrate";
913912
public static final String MIGRATE_ALLOWED = "migrateallowed";
914913
public static final String MIGRATE_TO = "migrateto";

api/src/main/java/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java

Lines changed: 0 additions & 124 deletions
This file was deleted.

api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou
6767
@Param(description = "Path of the Domain the Account belongs to", since = "4.13")
6868
private String domainPath;
6969

70-
@SerializedName(ApiConstants.DEFAULT_ZONE_ID)
71-
@Param(description = "The default zone of the Account")
72-
private String defaultZoneId;
73-
7470
@SerializedName(ApiConstants.RECEIVED_BYTES)
7571
@Param(description = "The total number of Network traffic bytes received")
7672
private Long bytesReceived;
@@ -672,10 +668,6 @@ public void setObjectStorageAvailable(String objectStorageAvailable) {
672668
this.objectStorageAvailable = objectStorageAvailable;
673669
}
674670

675-
public void setDefaultZone(String defaultZoneId) {
676-
this.defaultZoneId = defaultZoneId;
677-
}
678-
679671
public void setIsDefault(Boolean isDefault) {
680672
this.isDefault = isDefault;
681673
}

engine/schema/src/main/java/com/cloud/user/AccountVO.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ public class AccountVO implements Account {
7171
@Column(name = "uuid")
7272
private String uuid;
7373

74-
@Column(name = "default_zone_id")
75-
private Long defaultZoneId = null;
76-
7774
@Column(name = "default")
7875
boolean isDefault;
7976

@@ -158,15 +155,6 @@ public void setDomainId(long domainId) {
158155
this.domainId = domainId;
159156
}
160157

161-
@Override
162-
public Long getDefaultZoneId() {
163-
return defaultZoneId;
164-
}
165-
166-
public void setDefaultZoneId(Long defaultZoneId) {
167-
this.defaultZoneId = defaultZoneId;
168-
}
169-
170158
@Override
171159
public State getState() {
172160
return state;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
--;
19+
-- Schema upgrade cleanup from 4.23.0.0 to 4.24.0.0
20+
--;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
--;
19+
-- Schema upgrade from 4.23.0.0 to 4.24.0.0
20+
--;
21+
22+
-- Remove leftovers from awsapi
23+
CALL `cloud`.`IDEMPOTENT_DROP_FOREIGN_KEY`('cloud.account','fk_account__default_zone_id');
24+
CALL `cloud`.`IDEMPOTENT_DROP_COLUMN`('cloud.account', 'default_zone_id');
25+
CALL `cloud`.`IDEMPOTENT_DROP_COLUMN`('cloud_usage.account', 'default_zone_id');
26+
27+
DELETE FROM `cloud`.`configuration` WHERE name='enable.ec2.api';
28+
DELETE FROM `cloud`.`configuration` WHERE name='enable.s3.api';

engine/schema/src/main/resources/META-INF/db/views/cloud.account_view.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ select
3636
`domain`.`uuid` AS `domain_uuid`,
3737
`domain`.`name` AS `domain_name`,
3838
`domain`.`path` AS `domain_path`,
39-
`data_center`.`id` AS `data_center_id`,
40-
`data_center`.`uuid` AS `data_center_uuid`,
41-
`data_center`.`name` AS `data_center_name`,
4239
`account_netstats_view`.`bytesReceived` AS `bytesReceived`,
4340
`account_netstats_view`.`bytesSent` AS `bytesSent`,
4441
`vmlimit`.`max` AS `vmLimit`,
@@ -88,8 +85,6 @@ from
8885
inner join
8986
`cloud`.`domain` ON account.domain_id = domain.id
9087
left join
91-
`cloud`.`data_center` ON account.default_zone_id = data_center.id
92-
left join
9388
`cloud`.`account_netstats_view` ON account.id = account_netstats_view.account_id
9489
left join
9590
`cloud`.`resource_limit` vmlimit ON account.id = vmlimit.account_id

0 commit comments

Comments
 (0)