Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-9512

listTemplates ids returns all templates instead of the requested ones

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.8.1
    • Fix Version/s: 4.10.0.0
    • Component/s: API, Template
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Environment:
      CentOS 7.2 + VMWare 5.5u3 + NFS primary/secondary storage

      Description

      Actual call form the logs:

      {'account': u'test-a-TestListIdsParams-KYBF19', 
      'domainid': u'41c6fda1-84cf-11e6-bbd2-066638010710', 
      'ids': u'a4bcd20f-0c4c-4999-bb5e-02aab8f763a1,10a429da-829b-4492-9674-26b1c172462e,d3a9a86d-17a1-4199-8116-ceefc6ef31d5', 
      'apiKey': u'LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q', 
      'command': 'listTemplates', 
      'listall': True, 
      'signature': 'Yo7dRnPdSch+mEzcF8TTo1xhxpo=', 
      'templatefilter': 'all', 
      'response': 'json', 
      'listAll': True}

      When asking to list 3 or more

      (local) SBCM5> list templates templatefilter=all ids=a4bcd20f-0c4c-4999-bb5e-02aab8f763a1,10a429da-829b-4492-9674-26b1c172462e,d3a9a86d-17a1-4199-8116-ceefc6ef31d5

      You receive all templates (count: 14)
      Response

      {
        "count": 14,
        "template": [
          {
            "account": "system",
            "checksum": "4b415224fe00b258f66cad9fce9f73fc",
            "created": "2016-09-27T17:38:31+0100",
            "crossZones": true,
            "displaytext": "SystemVM Template (vSphere)",
            "domain": "ROOT",
            "domainid": "41c6fda1-84cf-11e6-bbd2-066638010710",
            "format": "OVA",
            "hypervisor": "VMware",
            "id": "6114746a-aefa-4be7-8234-f0d76ff175d0",
            "isdynamicallyscalable": true,
            "isextractable": false,
            "isfeatured": false,
            "ispublic": false,
            "isready": true,
            "name": "SystemVM Template (vSphere)",
            "ostypeid": "41db0847-84cf-11e6-bbd2-066638010710",
            "ostypename": "Debian GNU/Linux 5.0 (64-bit)",
            "passwordenabled": false,
            "size": 3145728000,
            "sshkeyenabled": false,
            "status": "Download Complete",
            "tags": [],
            "templatetype": "SYSTEM",
            "zoneid": "b8d4cea4-6b4b-4cfb-9f17-0a6b31fec09f",
      .
      .
      .
      .
      .
          
      }

      Marvin failure:

      2016-09-29 11:43:39,819 - CRITICAL - FAILED: test_02_list_templates: ['Traceback (most recent call last):\n', '  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run\n    testMethod()\n', '  File "/marvin/tests/smoke/test_list_ids_parameter.py", line 253, in test_02_list_templates\n    "ListTemplates response expected 3 Templates, received %s" % len(list_template_response)\n', '  File "/usr/lib64/python2.7/unittest/case.py", line 553, in assertEqual\n    assertion_func(first, second, msg=msg)\n', '  File "/usr/lib64/python2.7/unittest/case.py", line 546, in _baseAssertEqual\n    raise self.failureException(msg)\n', 'AssertionError: ListTemplates response expected 3 Templates, received 14\n']

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bstoyanov Boris Stoyanov
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: