Skip to content

Commit 87eeeeb

Browse files
author
Luiz.Machado
committed
tag_keys
1 parent 9273505 commit 87eeeeb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/com/cloud/network/router/CommandSetupHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import javax.inject.Inject;
2828

2929
import com.cloud.server.ResourceTag;
30+
import com.cloud.tags.TagKeysBuilder;
3031
import com.cloud.tags.dao.ResourceTagDao;
3132
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
3233
import org.apache.log4j.Logger;
@@ -1010,11 +1011,13 @@ public SetupGuestNetworkCommand createSetupGuestNetworkCommand(final DomainRoute
10101011
}
10111012

10121013
private void generateTagCommands(VmDataCommand cmd,long vmId){
1014+
10131015
List<ResourceTag> tags = (List<ResourceTag>)_resourceTagDao.listBy(vmId, ResourceTag.ResourceObjectType.UserVm);
10141016
if ( tags != null ){
10151017
for(ResourceTag tag : tags) {
10161018
cmd.addVmData("metadata", tag.getKey(), StringUtils.unicodeEscape(tag.getValue()));
10171019
}
1020+
cmd.addVmData("metadata", TagKeysBuilder.TAGKEYS_METADATA_KEY, TagKeysBuilder.buildTagKeys(tags));
10181021
}
10191022
}
10201023

0 commit comments

Comments
 (0)