← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1208743] Re: network uuid hasn't been checked in create server

 

** Changed in: nova
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1208743

Title:
  network uuid hasn't been checked in create server

Status in OpenStack Compute (Nova):
  Invalid

Bug description:
  when I port a negative tempest tests into v3, this test cann't pass
  but it can pass when use nova v2 api. I think there is no validation
  for networks.

      @attr(type=['negative', 'gate'])
      def test_create_with_invalid_network_uuid(self):
          # Pass invalid network uuid while creating a server

          networks = [{'fixed_ip': '10.0.1.1', 'uuid':
  'a-b-c-d-e-f-g-h-i-j'}]

          self.assertRaises(exceptions.BadRequest,
                            self.create_server,
                            networks=networks)
   
  The following is the log: 

  ======================================================================
  FAIL: tempest.api.compute.servers.v3.test_servers_negative.ServersNegativeV3TestJSON.test_create_with_invalid_network_uuid[gate,negative]
  ----------------------------------------------------------------------
  _StringException: Traceback (most recent call last):
    File "/opt/stack/tempest/tempest/api/compute/servers/v3/test_servers_negative.py", line 153, in test_create_with_invalid_network_uuid
      networks=networks)
    File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 394, in assertRaises
      self.assertThat(our_callable, matcher)
    File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 417, in assertThat
      raise MismatchError(matchee, matcher, mismatch, verbose)
  MismatchError: <bound method type.create_server of <class 'tempest.api.compute.servers.v3.test_servers_negative.ServersNegativeV3TestJSON'>> returned ({'status': '202', 'content-length': '345', 'x-compute-request-id': 'req-0d34c7cf-5047-4c75-848b-d30df693ead6', 'location': 'http://192.168.1.101:8774/v3/servers/d91862ce-d80d-44d0-957c-8b28370dd460', 'date': 'Tue, 06 Aug 2013 09:03:28 GMT', 'content-type': 'application/json'}, {u'links': [{u'href': u'http://192.168.1.101:8774/v3/servers/d91862ce-d80d-44d0-957c-8b28370dd460', u'rel': u'self'}, {u'href': u'http://192.168.1.101:8774/servers/d91862ce-d80d-44d0-957c-8b28370dd460', u'rel': u'bookmark'}], u'id': u'd91862ce-d80d-44d0-957c-8b28370dd460', u'security_groups': [{u'name': u'default'}], u'adminPass': u'r8vSmWK5W8rC'})

  -------------------- >> begin captured logging << --------------------
  tempest.common.rest_client: INFO: Request: POST http://192.168.1.101:8774/v3/servers
  tempest.common.rest_client: DEBUG: Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<Token omitted>'}
  tempest.common.rest_client: DEBUG: Request Body: {"server": {"flavorRef": 42, "name": "ServersNegativeV3TestJSON-instance1742202142", "imageRef": "cade0819-2939-484b-a52f-600d039aefc1", "networks": [{"fixed_ip": "10.0.1.1", "uuid": "a-b-c-d-e-f-g-h-i-j"}]}}
  tempest.common.rest_client: INFO: Response Status: 202
  tempest.common.rest_client: DEBUG: Response Headers: {'content-length': '345', 'location': 'http://192.168.1.101:8774/v3/servers/d91862ce-d80d-44d0-957c-8b28370dd460', 'date': 'Tue, 06 Aug 2013 09:03:28 GMT', 'x-compute-request-id': 'req-0d34c7cf-5047-4c75-848b-d30df693ead6', 'content-type': 'application/json'}
  tempest.common.rest_client: DEBUG: Response Body: {"server": {"security_groups": [{"name": "default"}], "id": "d91862ce-d80d-44d0-957c-8b28370dd460", "links": [{"href": "http://192.168.1.101:8774/v3/servers/d91862ce-d80d-44d0-957c-8b28370dd460";, "rel": "self"}, {"href": "http://192.168.1.101:8774/servers/d91862ce-d80d-44d0-957c-8b28370dd460";, "rel": "bookmark"}], "adminPass": "r8vSmWK5W8rC"}}

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1208743/+subscriptions