Issue in /api/nodes/interfaces/default_assignment/ handler

Bug #1374356 reported by Aleksey Kasatkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Ihor Kalnytskyi
5.1.x
Fix Released
High
Ihor Kalnytskyi

Bug Description

When making a call to the Fuel API

    GET /api/nodes/interfaces/default_assignment/

the response is HTTP 404

This API call is documented at:
http://docs.mirantis.com/fuel-dev/develop/nailgun/development/api_doc.html#nailgun.api.v1.handlers.node.NodeNICsDefaultHandler

For your info, making a call to
GET /api/nodes/%node_id%/interfaces/default_assignment/
works

But it would be more convenient to use the first call to get the info about all the nodes in one call.

Tags: nailgun
Changed in fuel:
assignee: nobody → Fuel Python Team (fuel-python)
milestone: none → 6.0
status: New → Confirmed
Changed in fuel:
importance: Undecided → High
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :
Changed in fuel:
status: Confirmed → Triaged
Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

It looks like the handler doesn't work at all. We use wrong object call: get_object_or_404 -> get_objects_list_or_404.

We don't have tests for this handler and unfortunately we broke it after code refactaroning.

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Igor Kalnitsky (ikalnitsky)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

Fix proposed to branch: master
Review: https://review.openstack.org/124421

Changed in fuel:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/124421
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=af6247aef7540156a093582fd091c95a8501a7aa
Submitter: Jenkins
Branch: master

commit af6247aef7540156a093582fd091c95a8501a7aa
Author: Igor Kalnitsky <email address hidden>
Date: Fri Sep 26 17:37:27 2014 +0300

    Fix NodeCollectionNICsDefaultHandler and add tests

    Since last refactoring we have broken NodeCollectionNICsDefaultHandler,
    so it's not working at all.

    Change-Id: I67f1794b806e3281a34aff7deda233c986937942
    Closes-Bug: #1374356

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/5.1)

Fix proposed to branch: stable/5.1
Review: https://review.openstack.org/124745

Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #549

"build_id": "2014-10-08_01-28-09", "ostf_sha": "45fe4038ba861673f3a6877d64582c2f66607d30", "build_number": "549", "auth_required": true, "api": "1.0", "nailgun_sha": "c5670fdf86e1cf257e1feef8458772a4979914a8", "production": "docker", "fuelmain_sha": "3bd44098b6772d57ca495f52401377fea419b34c", "astute_sha": "65a5a0781d314bdcc090a61a599a8abf95989fc1", "feature_groups": ["mirantis"], "release": "6.0", "release_versions": {"2014.2-6.0": {"VERSION": {"build_id": "2014-10-08_01-28-09", "ostf_sha": "45fe4038ba861673f3a6877d64582c2f66607d30", "build_number": "549", "api": "1.0", "nailgun_sha": "c5670fdf86e1cf257e1feef8458772a4979914a8", "production": "docker", "fuelmain_sha": "3bd44098b6772d57ca495f52401377fea419b34c", "astute_sha": "65a5a0781d314bdcc090a61a599a8abf95989fc1", "feature_groups": ["mirantis"], "release": "6.0", "fuellib_sha": "4d428945abc0d65fa9c4237274627fc3924c6fdf"}}}, "fuellib_sha": "4d428945abc0d65fa9c4237274627fc3924c6fdf"

Changed in fuel:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (stable/5.1)

Reviewed: https://review.openstack.org/124745
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=8fde8dc42614c5aa76c24a5d363ad70bd3925d80
Submitter: Jenkins
Branch: stable/5.1

commit 8fde8dc42614c5aa76c24a5d363ad70bd3925d80
Author: Igor Kalnitsky <email address hidden>
Date: Fri Sep 26 17:37:27 2014 +0300

    Fix NodeCollectionNICsDefaultHandler and add tests

    Since last refactoring we have broken NodeCollectionNICsDefaultHandler,
    so it's not working at all.

    Change-Id: I67f1794b806e3281a34aff7deda233c986937942
    Closes-Bug: #1374356
    (cherry picked from commit af6247aef7540156a093582fd091c95a8501a7aa)

Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #17

"build_id": "2014-11-16_21-00-23", "ostf_sha": "64cb59c681658a7a55cc2c09d079072a41beb346", "build_number": "17", "auth_required": true, "api": "1.0", "nailgun_sha": "2fc6fc4261092a591779a8fb7e3fb1623c6abb85", "production": "docker", "fuelmain_sha": "b118fa4475833ce031ef189ce280772c676fa1c9", "astute_sha": "702af3db6f5bca92525bc8322d7d5d7675ec857e", "feature_groups": ["mirantis"], "release": "5.1.1", "release_versions": {"2014.1.3-5.1.1": {"VERSION": {"build_id": "2014-11-16_21-00-23", "ostf_sha": "64cb59c681658a7a55cc2c09d079072a41beb346", "build_number": "17", "api": "1.0", "nailgun_sha": "2fc6fc4261092a591779a8fb7e3fb1623c6abb85", "production": "docker", "fuelmain_sha": "b118fa4475833ce031ef189ce280772c676fa1c9", "astute_sha": "702af3db6f5bca92525bc8322d7d5d7675ec857e", "feature_groups": ["mirantis"], "release": "5.1.1", "fuellib_sha": "0d3909b9a291880af28dbe48b9c7d25215aa98ea"}}}, "fuellib_sha": "0d3909b9a291880af28dbe48b9c7d25215aa98ea"

[root@fuel ~]# curl http://10.20.0.2:8000/api/nodes/interfaces/default_assignment/ -H "X-Auth-Token:459146ebe01c4dc1b665cd52b64b219b"
[[{"name": "eth0", "mac": "08:00:27:e4:98:6d", "max_speed": 100, "current_speed": 100, "assigned_networks": [{"id": 1, "name": "fuelweb_admin"}, {"id": 3, "name": "management"}, {"id": 4, "name": "storage"}, {"id": 5, "name": "fixed"}], "type": "ether", "id": 6}, {"name": "eth1", "mac": "08:00:27:da:f2:be", "max_speed": 100, "current_speed": 100, "assigned_networks": [{"id": 2, "name": "public"}], "type": "ether", "id": 5}, {"name": "eth2", "mac": "08:00:27:ee:93:50", "max_speed": 100, "current_speed": 100, "type": "ether", "id": 4}], [{"name": "eth0", "mac": "08:00:27:8f:aa:3f", "max_speed": 100, "current_speed": 100, "assigned_networks": [{"id": 1, "name": "fuelweb_admin"}, {"id": 3, "name": "management"}, {"id": 4, "name": "storage"}, {"id": 5, "name": "fixed"}], "type": "ether", "id": 3}, {"name": "eth1", "mac": "08:00:27:3d:2e:9d", "max_speed": 100, "current_speed": 100, "assigned_networks": [{"id": 2, "name": "public"}], "type": "ether", "id": 2}, {"name": "eth2", "mac": "08:00:27:e8:aa:bb", "max_speed": 100, "current_speed": 100, "type": "ether", "id": 1}]]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.