CLOUDSTACK-7981: added back resource tag related columns to user_vm_view to support resource tag related search.

This commit is contained in:
Min Chen 2014-12-02 21:40:57 -08:00
parent 54f4240e0e
commit 344d98e0bd
2 changed files with 74 additions and 0 deletions

View File

@ -31,6 +31,7 @@ import javax.persistence.Transient;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.network.Network.GuestType;
import com.cloud.network.Networks.TrafficType;
import com.cloud.server.ResourceTag.ResourceObjectType;
import com.cloud.storage.Storage.StoragePoolType;
import com.cloud.storage.Volume;
import com.cloud.utils.db.GenericDao;
@ -345,6 +346,34 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
@Column(name = "tag_id")
private long tagId;
@Column(name = "tag_uuid")
private String tagUuid;
@Column(name = "tag_key")
private String tagKey;
@Column(name = "tag_value")
private String tagValue;
@Column(name = "tag_domain_id")
private long tagDomainId;
@Column(name = "tag_account_id")
private long tagAccountId;
@Column(name = "tag_resource_id")
private long tagResourceId;
@Column(name = "tag_resource_uuid")
private String tagResourceUuid;
@Column(name = "tag_resource_type")
@Enumerated(value = EnumType.STRING)
private ResourceObjectType tagResourceType;
@Column(name = "tag_customer")
private String tagCustomer;
@Column(name = "affinity_group_id")
private long affinityGroupId;
@ -746,6 +775,42 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
return tagId;
}
public String getTagUuid() {
return tagUuid;
}
public String getTagKey() {
return tagKey;
}
public String getTagValue() {
return tagValue;
}
public long getTagDomainId() {
return tagDomainId;
}
public long getTagAccountId() {
return tagAccountId;
}
public long getTagResourceId() {
return tagResourceId;
}
public String getTagResourceUuid() {
return tagResourceUuid;
}
public ResourceObjectType getTagResourceType() {
return tagResourceType;
}
public String getTagCustomer() {
return tagCustomer;
}
public boolean isLimitCpuUse() {
return limitCpuUse;
}

View File

@ -655,6 +655,15 @@ CREATE VIEW `cloud`.`user_vm_view` AS
user_ip_address.public_ip_address public_ip_address,
ssh_keypairs.keypair_name keypair_name,
resource_tags.id tag_id,
resource_tags.uuid tag_uuid,
resource_tags.key tag_key,
resource_tags.value tag_value,
resource_tags.domain_id tag_domain_id,
resource_tags.account_id tag_account_id,
resource_tags.resource_id tag_resource_id,
resource_tags.resource_uuid tag_resource_uuid,
resource_tags.resource_type tag_resource_type,
resource_tags.customer tag_customer,
async_job.id job_id,
async_job.uuid job_uuid,
async_job.job_status job_status,