soreana opened a new issue, #7776:
URL: https://github.com/apache/cloudstack/issues/7776

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   API
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   
   ~~~
   4.17, 4.18, main, and probably most of the previous versions
   ~~~
   
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   
   When the API calls are made using only the `domainid` parameter, CloudStack 
currently ignores it. For instance, in the `createNetwork` api call, there is 
an option to pass both domainid and account parameters. All combinations of 
`domainid` and `account` in the following table make sense except for the 
second combination. As a user, I would expect that the network should be 
created under the specified domain or receive an error message stating that I 
need to provide an account as well. However, nowhere in the API documentation 
does it mention that an account must be provided when calling createNetwork 
with a specific domainid.
   
   | idx | domainid parameter is in API call | account parameter is in API call 
| result |
   |---|--------|--------|--------|
   | 1 | yes | yes | network created under the account and domain |
   | 2 | yes | NO | network created under the caller domain and account |
   | 3 | NO | yes | network creation failed  |
   | 4 | NO | NO | network created under the caller domain and account | 
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   
   Run the following command to create a network (type of network doesn't 
matter, I also checked the deploy virtual machine it is the same behaviour)
   
   ```
   (localcloud) > create network domainid=<domain id> name=L2-withou-account 
displaytext=L2-without-account zoneid=<zone id> networkofferingid=<offering id>
   {
     "network": {
       "account": "admin",
       "acltype": "Account",
   ...
       "domain": "ROOT",
       "domainid": "2ddf37db-1fc3-11ee-a012-1e00cf003378",
     }
   }
   ```
   
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   CloudStack throws an error or creates the network under the correct domain
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   Network created under the root domain.
   ~~~
   


-- 
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