Srikanteswararao Talluri created CLOUDSTACK-5148:
----------------------------------------------------

             Summary: [Automation] project scoped shared network test is 
failing because it is being created with admin account not scoped to that 
project
                 Key: CLOUDSTACK-5148
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5148
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Automation
    Affects Versions: 4.3.0
            Reporter: Srikanteswararao Talluri
             Fix For: 4.3.0


test_createSharedNetwork_projectSpecific is failing 

we need to create virtual machine with the account created in the test , 
instead we are trying to create the virtual with ROOT admin account.

to solve this issue, test needs to create a apiclient for project scoped 
account and attempt to deployVirtualMachine


Error Message

Execute cmd: deployvirtualmachine failed, due to: errorCode: 431, 
errorText:only shared network or isolated network with the same account_id can 
be added to vm
-------------------- >> begin captured logging << --------------------
testclient.testcase.TestSharedNetworks: DEBUG: Admin account created: 
ec3f73fe-1d64-4a4c-9cee-b34714317fac
testclient.testcase.TestSharedNetworks: DEBUG: Project created: 
e00886e0-cec5-4ae1-8099-f1d93af82255
testclient.testcase.TestSharedNetworks: DEBUG: Project2 created: 
d7315511-9bc0-43f7-9bd9-9a28fb185325
testclient.testcase.TestSharedNetworks: DEBUG: Attempting free VLAN 1079 for 
shared network creation
testclient.testcase.TestSharedNetworks: DEBUG: Physical Network found: 
bef59427-9e43-4955-8ef0-312946d424ba
testclient.testcase.TestSharedNetworks: DEBUG: Shared Network found: 
132da502-ab0f-4f46-be3a-0f3de40ccfe7
testclient.testcase.TestSharedNetworks: DEBUG: Shared Network created: 
1fdc3605-ae8e-404b-82cb-8a2067dcd0fd
testclient.testcase.TestSharedNetworks: DEBUG: Virtual Machine creation failed 
as network used have scoped only for project project1. Exception: Execute cmd: 
deployvirtualmachine failed, due to: errorCode: 431, errorText:only shared 
network or isolated network with the same account_id can be added to vm
--------------------- >> end captured logging << ---------------------
Stacktrace

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/unittest/case.py", line 318, in run
    testMethod()
  File "/root/cloudstack/test/integration/component/test_shared_networks.py", 
line 1720, in test_createSharedNetwork_projectSpecific
    serviceofferingid=self.service_offering.id
  File "/usr/local/lib/python2.7/site-packages/marvin/integration/lib/base.py", 
line 408, in create
    virtual_machine = apiclient.deployVirtualMachine(cmd, method=method)
  File 
"/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
 line 1188, in deployVirtualMachine
    response = self.connection.marvinRequest(command, response_type=response, 
method=method)
  File "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py", 
line 290, in marvinRequest
    response = jsonHelper.getResultObj(response.json(), response_type)
  File "/usr/local/lib/python2.7/site-packages/marvin/jsonHelper.py", line 148, 
in getResultObj
    raise cloudstackException.cloudstackAPIException(respname, errMsg)
cloudstackAPIException: Execute cmd: deployvirtualmachine failed, due to: 
errorCode: 431, errorText:only shared network or isolated network with the same 
account_id can be added to vm
-------------------- >> begin captured logging << --------------------
testclient.testcase.TestSharedNetworks: DEBUG: Admin account created: 
ec3f73fe-1d64-4a4c-9cee-b34714317fac
testclient.testcase.TestSharedNetworks: DEBUG: Project created: 
e00886e0-cec5-4ae1-8099-f1d93af82255
testclient.testcase.TestSharedNetworks: DEBUG: Project2 created: 
d7315511-9bc0-43f7-9bd9-9a28fb185325
testclient.testcase.TestSharedNetworks: DEBUG: Attempting free VLAN 1079 for 
shared network creation
testclient.testcase.TestSharedNetworks: DEBUG: Physical Network found: 
bef59427-9e43-4955-8ef0-312946d424ba
testclient.testcase.TestSharedNetworks: DEBUG: Shared Network found: 
132da502-ab0f-4f46-be3a-0f3de40ccfe7
testclient.testcase.TestSharedNetworks: DEBUG: Shared Network created: 
1fdc3605-ae8e-404b-82cb-8a2067dcd0fd
testclient.testcase.TestSharedNetworks: DEBUG: Virtual Machine creation failed 
as network used have scoped only for project project1. Exception: Execute cmd: 
deployvirtualmachine failed, due to: errorCode: 431, errorText:only shared 
network or isolated network with the same account_id can be added to vm
--------------------- >> end captured logging << ---------------------



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to