Skip to content

Commit 800d01d

Browse files
committed
<fix>[tag]: add resourceType field to TagPatternVO
Resolves: ZSTAC-74908 Change-Id: I48054139babb1e8092ab81e4367743ae3fd8aefb
1 parent addec8c commit 800d01d

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

conf/db/upgrade/V5.5.6__schema.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,6 @@ SET g.`allocateStatus` = 'Unallocatable'
229229
WHERE p.`virtStatus` IN ('VFIO_MDEV_VIRTUALIZED', 'SRIOV_VIRTUALIZED')
230230
AND p.`vmInstanceUuid` IS NULL
231231
AND g.`allocateStatus` != 'Unallocatable';
232+
233+
-- ZSTAC-74908: Add resourceType to TagPatternVO to scope AI model tags away from VM pages
234+
CALL ADD_COLUMN('TagPatternVO', 'resourceType', 'VARCHAR(128)', 1, NULL);

header/src/main/java/org/zstack/header/tag/TagPatternVO.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public class TagPatternVO extends ResourceVO implements OwnedByAccount {
3030
@Transient
3131
private String accountUuid;
3232

33+
@Column
34+
private String resourceType;
35+
3336
@Column
3437
private Timestamp createDate;
3538

@@ -106,4 +109,12 @@ public TagPatternType getType() {
106109
public void setType(TagPatternType type) {
107110
this.type = type;
108111
}
112+
113+
public String getResourceType() {
114+
return resourceType;
115+
}
116+
117+
public void setResourceType(String resourceType) {
118+
this.resourceType = resourceType;
119+
}
109120
}

0 commit comments

Comments
 (0)