Skip to content

Commit b545d49

Browse files
author
Pearl Dsilva
committed
Merge branch 'master' of https://github.com/apache/cloudstack into cks_debian
2 parents 31ad3c2 + 2d1989f commit b545d49

26 files changed

Lines changed: 439 additions & 240 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ public class ApiConstants {
386386
public static final String VIRTUAL_MACHINE_NAME = "virtualmachinename";
387387
public static final String VIRTUAL_MACHINE_ID_IP = "vmidipmap";
388388
public static final String VIRTUAL_MACHINE_COUNT = "virtualmachinecount";
389+
public static final String VIRTUAL_MACHINES = "virtualmachines";
389390
public static final String USAGE_ID = "usageid";
390391
public static final String USAGE_TYPE = "usagetype";
391392
public static final String INCLUDE_TAGS = "includetags";

api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.cloudstack.api.APICommand;
2222
import org.apache.cloudstack.api.ApiErrorCode;
2323
import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd;
24+
import org.apache.cloudstack.api.Parameter;
2425
import org.apache.cloudstack.api.ResponseObject.ResponseView;
2526
import org.apache.cloudstack.api.ServerApiException;
2627
import org.apache.cloudstack.api.command.user.UserCmd;
@@ -35,6 +36,13 @@ public class UpdateTemplateCmd extends BaseUpdateTemplateOrIsoCmd implements Use
3536
public static final Logger s_logger = Logger.getLogger(UpdateTemplateCmd.class.getName());
3637
private static final String s_name = "updatetemplateresponse";
3738

39+
/////////////////////////////////////////////////////
40+
//////////////// API parameters /////////////////////
41+
/////////////////////////////////////////////////////
42+
43+
@Parameter(name = "templatetype", type = CommandType.STRING, description = "the type of the template")
44+
private String templateType;
45+
3846
/////////////////////////////////////////////////////
3947
/////////////////// Accessors ///////////////////////
4048
/////////////////////////////////////////////////////
@@ -44,6 +52,10 @@ public Boolean getBootable() {
4452
return null;
4553
}
4654

55+
public String getTemplateType() {
56+
return templateType;
57+
}
58+
4759
/////////////////////////////////////////////////////
4860
/////////////// API Implementation///////////////////
4961
/////////////////////////////////////////////////////

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
219219
@Param(description = "true if template requires HVM enabled, false otherwise")
220220
private Boolean requiresHvm;
221221

222+
@SerializedName(ApiConstants.URL)
223+
@Param(description = "the URL which the template/iso is registered from")
224+
private String url;
225+
222226
public TemplateResponse() {
223227
tags = new LinkedHashSet<>();
224228
}
@@ -450,4 +454,8 @@ public void addDeployAsIsDetail(String key, String value) {
450454
}
451455
this.deployAsIsDetails.put(key,value);
452456
}
457+
458+
public void setUrl(String url) {
459+
this.url = url;
460+
}
453461
}

debian/cloudstack-agent.install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
/usr/bin/cloudstack-setup-agent
2525
/usr/bin/cloudstack-ssh
2626
/usr/bin/cloudstack-agent-upgrade
27+
/usr/bin/cloudstack-guest-tool
2728
/usr/share/cloudstack-agent/lib/*
2829
/usr/share/cloudstack-agent/plugins

engine/schema/src/main/resources/META-INF/db/schema-41400to41500.sql

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ ALTER TABLE `cloud`.`project_invitations`
7575
ADD CONSTRAINT `uc_project_invitations__project_id_account_id_user_id` UNIQUE (`project_id`, `account_id`,`user_id`);
7676

7777
-- Alter project_invitation_view to incorporate user_id as a field
78-
ALTER VIEW `cloud`.`project_invitation_view` AS
78+
DROP VIEW IF EXISTS `cloud`.`project_invitation_view`;
79+
CREATE VIEW `cloud`.`project_invitation_view` AS
7980
select
8081
project_invitations.id,
8182
project_invitations.uuid,
@@ -107,7 +108,8 @@ ALTER VIEW `cloud`.`project_invitation_view` AS
107108
`cloud`.`user` ON project_invitations.user_id = user.id;
108109

109110
-- Alter project_account_view to incorporate user id
110-
ALTER VIEW `cloud`.`project_account_view` AS
111+
DROP VIEW IF EXISTS `cloud`.`project_account_view`;
112+
CREATE VIEW `cloud`.`project_account_view` AS
111113
select
112114
project_account.id,
113115
account.id account_id,
@@ -140,7 +142,9 @@ ALTER VIEW `cloud`.`project_account_view` AS
140142
left join
141143
`cloud`.`user` ON (project_account.user_id = user.id);
142144

143-
ALTER VIEW `cloud`.`project_view` AS
145+
-- Alter project_view to incorporate user id
146+
DROP VIEW IF EXISTS `cloud`.`project_view`;
147+
CREATE VIEW `cloud`.`project_view` AS
144148
select
145149
projects.id,
146150
projects.uuid,
@@ -558,7 +562,8 @@ CREATE TABLE `cloud`.`user_vm_deploy_as_is_details` (
558562

559563
ALTER TABLE `cloud`.`image_store` ADD COLUMN `readonly` boolean DEFAULT false COMMENT 'defines status of image store';
560564

561-
ALTER VIEW `cloud`.`image_store_view` AS
565+
DROP VIEW IF EXISTS `cloud`.`image_store_view`;
566+
CREATE VIEW `cloud`.`image_store_view` AS
562567
select
563568
image_store.id,
564569
image_store.uuid,
@@ -826,6 +831,9 @@ INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_vers
826831
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '6.7.2', 'vmwarePhoton64Guest', 329, now(), 0);
827832
INSERT INTO `cloud`.`guest_os_hypervisor` (uuid,hypervisor_type, hypervisor_version, guest_os_name, guest_os_id, created, is_user_defined) VALUES (UUID(),'VMware', '6.7.3', 'vmwarePhoton64Guest', 329, now(), 0);
828833

834+
-- Fix OS category for Guest OS 'Other PV Virtio-SCSI (64-bit)'
835+
UPDATE `cloud`.`guest_os` SET category_id = 7 WHERE id = 275 AND display_name = 'Other PV Virtio-SCSI (64-bit)';
836+
829837
ALTER TABLE `cloud`.`user_vm` ADD COLUMN `user_vm_type` varchar(255) DEFAULT "UserVM" COMMENT 'Defines the type of UserVM';
830838

831839
UPDATE `cloud`.`vm_template` set deploy_as_is = 1 where id = 8;

0 commit comments

Comments
 (0)