mirror of https://github.com/apache/cloudstack.git
backwards compatible project id handling
This commit is contained in:
parent
10a29c5d07
commit
a39505cc86
|
|
@ -217,7 +217,7 @@ public class TaggedResourceManagerImpl extends ManagerBase implements TaggedReso
|
|||
}
|
||||
|
||||
if (resourceType == ResourceObjectType.Project) {
|
||||
accountId = ((ProjectVO)entity).getProjectAccountId();
|
||||
accountId = ((ProjectVO)entity).getId();
|
||||
}
|
||||
|
||||
if (entity instanceof OwnedBy) {
|
||||
|
|
|
|||
|
|
@ -1751,6 +1751,13 @@ class TestResourceTags(cloudstackTestCase):
|
|||
)
|
||||
self.debug("Tag created: %s" % tag.__dict__)
|
||||
|
||||
tag2 = Tag.list(
|
||||
self.apiclient,
|
||||
listall=True,
|
||||
resourceType='project',
|
||||
resourceIds=project.id,
|
||||
key=tag_key,
|
||||
)
|
||||
tags = Tag.list(
|
||||
self.apiclient,
|
||||
listall=True,
|
||||
|
|
@ -1760,17 +1767,35 @@ class TestResourceTags(cloudstackTestCase):
|
|||
key=tag_key,
|
||||
)
|
||||
self.debug("tags = %s" % tags)
|
||||
tag2 = Tag.list(
|
||||
self.apiclient,
|
||||
listall=True,
|
||||
resourceType='project',
|
||||
resourceIds=project.id,
|
||||
key=tag_key,
|
||||
)
|
||||
self.debug("tag2 = %s" % tags)
|
||||
|
||||
self.assertEqual(
|
||||
isinstance(tags, list),
|
||||
True,
|
||||
"List tags should not return empty response"
|
||||
)
|
||||
self.assertEqual(
|
||||
isinstance(tag2, list),
|
||||
True,
|
||||
"List tags should not return empty response"
|
||||
)
|
||||
self.assertEqual(
|
||||
tags[0].value,
|
||||
tag_value,
|
||||
'The tag should have original value'
|
||||
)
|
||||
self.assertEqual(
|
||||
tag2[0].value,
|
||||
tag_value,
|
||||
'The tag should have original value'
|
||||
)
|
||||
|
||||
projects = Project.list(
|
||||
self.apiclient,
|
||||
|
|
|
|||
Loading…
Reference in New Issue