Skip to content

Commit 8cb11f4

Browse files
committed
CLOUDSTACK-7981: added back resource tag related columns to user_vm_view to support resource tag related search.
1 parent a81b59e commit 8cb11f4

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

server/src/com/cloud/api/query/vo/UserVmJoinVO.java

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.cloud.hypervisor.Hypervisor.HypervisorType;
3232
import com.cloud.network.Network.GuestType;
3333
import com.cloud.network.Networks.TrafficType;
34+
import com.cloud.server.ResourceTag.ResourceObjectType;
3435
import com.cloud.storage.Storage.StoragePoolType;
3536
import com.cloud.storage.Volume;
3637
import com.cloud.utils.db.GenericDao;
@@ -345,6 +346,34 @@ public class UserVmJoinVO extends BaseViewVO implements ControlledViewEntity {
345346
@Column(name = "tag_id")
346347
private long tagId;
347348

349+
@Column(name = "tag_uuid")
350+
private String tagUuid;
351+
352+
@Column(name = "tag_key")
353+
private String tagKey;
354+
355+
@Column(name = "tag_value")
356+
private String tagValue;
357+
358+
@Column(name = "tag_domain_id")
359+
private long tagDomainId;
360+
361+
@Column(name = "tag_account_id")
362+
private long tagAccountId;
363+
364+
@Column(name = "tag_resource_id")
365+
private long tagResourceId;
366+
367+
@Column(name = "tag_resource_uuid")
368+
private String tagResourceUuid;
369+
370+
@Column(name = "tag_resource_type")
371+
@Enumerated(value = EnumType.STRING)
372+
private ResourceObjectType tagResourceType;
373+
374+
@Column(name = "tag_customer")
375+
private String tagCustomer;
376+
348377
@Column(name = "affinity_group_id")
349378
private long affinityGroupId;
350379

@@ -746,6 +775,42 @@ public long getTagId() {
746775
return tagId;
747776
}
748777

778+
public String getTagUuid() {
779+
return tagUuid;
780+
}
781+
782+
public String getTagKey() {
783+
return tagKey;
784+
}
785+
786+
public String getTagValue() {
787+
return tagValue;
788+
}
789+
790+
public long getTagDomainId() {
791+
return tagDomainId;
792+
}
793+
794+
public long getTagAccountId() {
795+
return tagAccountId;
796+
}
797+
798+
public long getTagResourceId() {
799+
return tagResourceId;
800+
}
801+
802+
public String getTagResourceUuid() {
803+
return tagResourceUuid;
804+
}
805+
806+
public ResourceObjectType getTagResourceType() {
807+
return tagResourceType;
808+
}
809+
810+
public String getTagCustomer() {
811+
return tagCustomer;
812+
}
813+
749814
public boolean isLimitCpuUse() {
750815
return limitCpuUse;
751816
}

setup/db/db/schema-442to450.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,15 @@ CREATE VIEW `cloud`.`user_vm_view` AS
655655
user_ip_address.public_ip_address public_ip_address,
656656
ssh_keypairs.keypair_name keypair_name,
657657
resource_tags.id tag_id,
658+
resource_tags.uuid tag_uuid,
659+
resource_tags.key tag_key,
660+
resource_tags.value tag_value,
661+
resource_tags.domain_id tag_domain_id,
662+
resource_tags.account_id tag_account_id,
663+
resource_tags.resource_id tag_resource_id,
664+
resource_tags.resource_uuid tag_resource_uuid,
665+
resource_tags.resource_type tag_resource_type,
666+
resource_tags.customer tag_customer,
658667
async_job.id job_id,
659668
async_job.uuid job_uuid,
660669
async_job.job_status job_status,

0 commit comments

Comments
 (0)