DaanHoogland commented on code in PR #7416:
URL: https://github.com/apache/cloudstack/pull/7416#discussion_r1187259257


##########
api/src/main/java/com/cloud/configuration/Resource.java:
##########
@@ -22,55 +22,34 @@ public interface Resource {
     String UNLIMITED = "Unlimited";
 
     enum ResourceType { // Primary and Secondary storage are allocated_storage 
and not the physical storage.
-        user_vm("user_vm", 0, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        public_ip("public_ip", 1, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        volume("volume", 2, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        snapshot("snapshot", 3, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        template("template", 4, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        project("project", 5, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        network("network", 6, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        vpc("vpc", 7, ResourceOwnerType.Account, ResourceOwnerType.Domain),
-        cpu("cpu", 8, ResourceOwnerType.Account, ResourceOwnerType.Domain),
-        memory("memory", 9, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        primary_storage("primary_storage", 10, ResourceOwnerType.Account, 
ResourceOwnerType.Domain),
-        secondary_storage("secondary_storage", 11, ResourceOwnerType.Account, 
ResourceOwnerType.Domain);
+        user_vm("user_vm", 0),

Review Comment:
   Valid question @rohityadavcloud. I didn“t see this as a problem yet, but: 
How is this for projects? Do resources still belong to an account or domain?
   
   the answer might be easy and I think we can consider this a valid 
code-clean-up. By the look of `ResourceOwnerType` it is not very convenient. In 
additione to that, the use of the types in `ConfigurationManagerImpl` lines 
1318 and up seems to indicate that custom owner types are not possible. What do 
you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to